Android cómo comprobar si el servicio intent se sigue ejecutando o ha dejado de ejecutarse
Necesito saber si todos los intentservices en la cola están "consumidos" o la otra forma es averiguar si todavía está haciendo algo para que no continúe hasta que todos los servicios hayan dejado de ejecutarse. Alguna idea?
25
1 answers
Intente esto puede ser útil para 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;
}
74
Author: Parag Chauhan,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-10-31 06:40:25
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-10-31 06:40:25