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?
For your information: I've subclassed IntentService.
Thanks for any help.
Binabik
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…