0

In my Application i wants to make volley API call 10 or more times, but i need to hit the request one after another, i am using for loop to make 10 request call,is there any option to hit the request in queue ?

Here is the code,

 for(int i = 0;i<10;i++) {

  serverAPICall();
}

1 Answers1

-1

I code in python... but there is sometimes a limit to the number of calls you can make in a given timeframe to an API (rate limit). Check the rate limit. If that is the case in this instance, you need to use a 'sleep' method to slow the loop down to get above the rate limit. Take a look at this solution:

How to pause / sleep thread or process in Android?

Community
  • 1
  • 1
Kate Stohr
  • 99
  • 2
  • 5