Android Volley synchronous request not working
问题 I am trying to make a synchronous request to the server using RequestFuture but it's not working . The same request when done using asynchronous works fine. This is my code: public void fetchModules(){ JSONObject response = null; RequestQueue requestQueue = Volley.newRequestQueue(getContext()); RequestFuture<JSONObject> future = RequestFuture.newFuture(); JsonObjectRequest request = new JsonObjectRequest(Url.ALL_MODULES_URL,null,future,future); requestQueue.add(request); try { response =