获取正在运行的服务
aide吧
全部回复
仅看楼主
level 11
2016年10月08日 09点10分 1
level 11
布局
2016年10月08日 09点10分 2
level 11
TextView tv=(TextView) findViewById(R.id.mainTextView1);
tv.setText("");
ActivityManager am=(ActivityManager) getSystemService(ACTIVITY_SERVICE);
List<ActivityManager.RunningServiceInfo> list=am.getRunningServices(Integer.MAX_VALUE);
for(ActivityManager.RunningServiceInfo current:list)
{
tv.append(String.format("pid:%s , process:%s \n",current.pid,current.process));
}
2016年10月08日 09点10分 3
level 11
测试手机系统为多少?试过在5.0上有问题吗
2016年10月08日 15点10分 5
5.0只是不能获取顶部Activity ,其他基本没问题
2016年10月09日 04点10分
回复
文WU2564857826
:我就说嘛,不过还是有办法的
2016年10月10日 05点10分
level 13
表示在华为5.1系统获取失败
是不是系统禁止了[吐舌]
2016年10月10日 02点10分 6
level 11
ps -aux?
2016年10月10日 08点10分 7
1