// get specified service is running
ActivityManager myManager=(ActivityManager)this.getSystemService(Context.ACTIVITY_SERVICE);
ArrayList runningService = (ArrayList) myManager.getRunningServices(30);
for(int i = 0 ; i < runningservice.size();i++) {
if(runningService.get(i). service .getClassName().toString().equals("com.xxx.RuningService")) {
return true;
}
}
return false;
ActivityManager myManager=(ActivityManager)this.getSystemService(Context.ACTIVITY_SERVICE);
ArrayList
for(int i = 0 ; i < runningservice.size();i++) {
return false;
沒有留言:
張貼留言