If I have the following code:
Intent intent = new Intent(this,DownloadService.class);
for(int i=0;i
Adding some more information to the above answers which may be helpful for others is that, startId that the onStartCommand() method receives is different for every startService() call.
Also if we write in for loop as mentioned above, code written in onHandleIntent() would execute so many times as defined by the for loop frequency, but in sequence and not in parallel.
The concept is IntentService creates a work queue and each request to startService() trigger onStartCommand() which in turn stores the intent in work queue and then pass the intent one by one to onHandleIntent().