title: startService() throws java.lang.IllegalStateException
body: <p>From <code>onCreate()</code> of my Activity,</p>
  
  <p>I am trying to start a service via following code:</p>
  
  <pre><code>Intent intent = new Intent();
  intent.setClassName(SERVICE_PKG_NAME, SERVICE_NAME);
  context.startService(intent); //context = MainActivity.this
  </code></pre>
  
  <p>However, I receive following exception:</p>
  
  <blockquote>
    <p>java.lang.IllegalStateException: Not allowed to start service Intent (service-name) : app is in background</p>
  </blockquote>
  
  <p>Any idea what could be reason for this? Stuck on it for few hours now.</p>