1

I've in android (Java) two sequential JsonObjectRequest tha call url1 first time and url2 second time

public class ProvaActivity extends AppCompatActivity {

    private void resolveIntent(Intent intent) {
        ...
        JsonObjectRequest obreq = null;

        obreq = new JsonObjectRequest(Request.Method.GET, url1, new Response.Listener<JSONObject>() {                   

                    ....

        obreq = new JsonObjectRequest(Request.Method.GET, url2, new Response.Listener<JSONObject>() {
                    ....

}

I want second JsonObjectRequest is launched only when first one is finished. How can i do that?

  • Check this https://stackoverflow.com/questions/23833977/android-wait-for-volley-response-to-return – Emerson Gonzalez Jun 02 '22 at 01:03
  • Does this answer your question? [Android - Wait for volley response to return](https://stackoverflow.com/questions/23833977/android-wait-for-volley-response-to-return) – Oleg Ushakov Jun 02 '22 at 17:50

0 Answers0