public static boolean isServiceStarted(Context context,String PackageName){ boolean isStarted =false; try{ int intGetTastCounter = 1000; ActivityManager mActivityManager = (ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE); List<ActivityManager.RunningServiceInfo> mRunningService = mActivityManager.getRunningServices(intGetTastCounter); for (ActivityManager.RunningServiceInfo amService : mRunningService){ if(0 == amService.service.getPackageName().compareTo(PackageName)){ isStarted = true; break; } } }catch(SecurityException e){ e.printStackTrace(); } return isStarted; }