title: Starting service multiple times will nest calls made in onStartCommand()?
body: <p>I am calling <code>startService()</code> multiple times in my class.</p>
  
  <p>there is a function in my service's <code>onStartCommand()</code>, like this - </p>
  
  <pre><code>    Override
      public int onStartCommand(Intent intent, int flags, int startId) {
          Log.d(StaticValues.TAG, "service started.");
          processItem();
          return 0;
      }
  </code></pre>
  
  <p>My question is, if I start service again, <code>onStartComamnd()</code> will be called again. So will this call wait till my previous call is over or it will execute both calls to <code>processItem()</code> parallelly?</p>
  
  <p><strong>Edit : Answer I found from links in comments</strong></p>
  
  <blockquote>
    <p><code>startService()</code> is asynchronous. So while you are looping the calls, the service itself hasn't gotten any resources and didn't start yet.</p>
    
    <p>The Service will only run in one instance. However, everytime you start the service, the onStartCommand() method is called.</p>
  </blockquote>
  
  <p>Check : <a href="https://stackoverflow.com/questions/8019899/what-happens-if-a-service-is-started-multiple-times">What happens if a Service is started multiple times?</a></p>