List of utility methods to do Service Check
boolean | isServiceRunning(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; |