Android: How do I know if Commonsware’s WakefulIntent Service is running?
I
have a simple question: I use commonsware’s wakefulintent service in my application and I get it to work, but how do I know if WakefulIntentService is still running? For example, can I put an onDestroy in the WakefulIntent Service class and have it log something, or is there some other way to see if WakefulIntentService is running?
Thanks in advance!
Solution
I’m using commonsware’s wakefulintentservice in my application and I got it working, but how do I know if the WakefulIntentService is still running or not?
If you mean “is it running all the time”, you’ll see if the job it’s supposed to do has been done.
If you mean “it’s running now”, I would like to check your thread in DDMS. I’ve never really worried about this.
Can I for example put a onDestroy in the WakefulIntentService class and let that log something
Of course.
Update
In addition, the adb shell dumpsys
activity services will list the activity services. I haven’t tried it with WakefulIntentService
yet, but as far as I know it should show up there.