Java tutorial
//package com.java2s; import android.app.ActivityManager; import android.app.ActivityManager.RunningServiceInfo; import android.content.Context; public class Main { @SuppressWarnings("static-access") public static boolean isServiceRunning(Context c, String serviceName) { ActivityManager manager = (ActivityManager) c.getSystemService(c.ACTIVITY_SERVICE); for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) { if (serviceName.equals(service.service.getClassName())) { return true; } } return false; } }