Check this:
private boolean isMyServiceRunning() { ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE); for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) { if ("com.example.MyService".equals(service.service.getClassName())) { return true; } } return false;}
@bigstones: I donβt know how, but I have a service that you can create as many times as you like (perhaps because I create various running objects inside it).
source share