Service.onDestroy() is called directly after creation, anyway the Service does its work
<p>I built a Service and it didn't work as expected, so I debugged it. During debugging, I saw that the service's onDestroy() method is called directly after returning from onCreate(). When I comment out the cleanup that happens in onDestroy(), the service does its work, but this should not be my solution. So my question is, why is onDestroy() called so early and why is the service running anyway? Or how can I prevent onDestroy() from being called at the wrong time?</p>

<p>For your information: I've subclassed IntentService.</p>

<p>Thanks for any help.</p>

<p>Binabik</p>
