Android Utililty Methods Service Check

List of utility methods to do Service Check

Description

The list of methods to do Service Check are organized into topic(s).

Method

booleanisServiceRunning(Context ctx, Class serviceClass)
is Service Running
ActivityManager manager = (ActivityManager) ctx
        .getSystemService(Context.ACTIVITY_SERVICE);
for (RunningServiceInfo service : manager
        .getRunningServices(Integer.MAX_VALUE)) {
    if (serviceClass.getName().equals(
            service.service.getClassName())) {
        return true;
return false;