I need to know if all intentservices in the queue are "consumed" or the other way is to find out if it is still doing something so that I don't continue until all services have stopped running. Any ideas?
Asked
Active
Viewed 1.8k times
1 Answers
78
Try this may be useful for u
private boolean isMyServiceRunning() {
ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
if ("com.example.MyService".equals(service.service.getClassName())) {
return true;
}
}
return false;
}

Parag Chauhan
- 35,760
- 13
- 86
- 95
-
1@Kishore this same topic here http://stackoverflow.com/questions/2176375/android-service-wont-stop – Parag Chauhan Mar 14 '12 at 07:43