Compare your service name with class name of running services to find out your service is running or not.
ActivityManager activityManager= (ActivityManager)getSystemService(ACTIVITY_SERVICE);
for (RunningServiceInfo service : activityManager.getRunningServices(Integer.MAX_VALUE)) {
Log.i("Service", "Process " + service.process + " with component " + service.service.getClassName());
}
Comments
Post a Comment