final ActivityManager manager = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE); for (ActivityManager.RunningServiceInfo service11:manager.getRunningServices(Integer.MAX_VALUE)) { Log.v("xxxxxxxxx",BindService.class.getName()+"****"+service11.service.getClassName()); if (BindService.class.getName().equals( service11.service.getClassName())) { isRunning = true; } }
from stackoverflow