How can I return value from function onResponse of Retrofit?
问题 I'm trying to return a value that i get from onResponse method in retrofit call request, is there a way that i can get that value out of the overrided method? here is my code: public JSONArray RequestGR(LatLng start, LatLng end) { final JSONArray jsonArray_GR; EndpointInterface loginService = ServiceAuthGenerator.createService(EndpointInterface.class); Call<GR> call = loginService.getroutedriver(); call.enqueue(new Callback<GR>() { @Override public void onResponse(Response<GR> response ,