标签为 [service] 的文章

Android判断Service是否运行

1234567891011121314 /*** 判断服务是否正在运行* @return*/public boolean isServiceWorked() {    ActivityManager myManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);    ArrayList runningService = (ArrayList) myManager.getRunningServices(Integer.MAX_VALUE);    for (int i = 0; i < runningService.size(); i++) {       &n ......