import android.app.ActivityManager; import android.app.Service; import android.content.Context; import java.util.List; /** * Created by Administrator on 2016/11/23 0023. * 判断服务是否运行 */ public class ServiceStatusUtils { //PackageManager, TelephoyManage
1.显示系统当前所有运行服务: ActivityManager am = (ActivityManager) MainActivity.this.getSystemService(Context.ACTIVITY_SERVICE); for (RunningServiceInfo service : am.getRunningServices(Integer.MAX_VALUE)) { System.out.println(service.service.getPackageName()+"--
win10系统,装了iis就是启动不了,报错误 1068:依赖服务或组件无法启动. 各种实验无法使用,最后如下方法解决 运行命令regedit,打开注册表编辑器,进入:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP]: a) Change Start from 4 ( disabled) to 3 ( automatically)b) Delete "NoRun" key if this key exists 在此留念