You can get a list of services running using this sort of code:
private boolean isMyServiceRunning(Context context)
{
ActivityManager manager = (ActivityManager) context.getSystemService(Service.ACTIVITY_SERVICE);
for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE))
{
if (service.service.getClassName().equals("myPackage.MySuperApplication"))
{
return true;
}
}
return false;
}
There are a whole bunch of Service. types that you can check for and if you want to find a specific one, you use its fully qualified name.