Skip to content

Instantly share code, notes, and snippets.

Avatar
📱

Angelo Moroni chemickypes

📱
View GitHub Profile
View Android Check if Service is Running
private boolean isServiceRunning() {
ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)){
if("com.example.MyNeatoIntentService".equals(service.service.getClassName())) {
return true;
}
}
return false;
}
You can’t perform that action at this time.