代码如下:
ActivityManager am = (ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE);
List<RunningServiceInfo> infos = am.getRunningServices(30); //30是最大值
for(RunningServiceInfo info : infos){
if(info.service.getClassName().equals("Service的全名")){
//...
}
}