在Android 5.1.1调用getRunningAppProcesses问题() [英] Issues in invoking getRunningAppProcesses() on Android 5.1.1
本文介绍了在Android 5.1.1调用getRunningAppProcesses问题()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试在Android 5.1.1调用getRunningAppProcesses(),但它返回空列表或者只包含我application.But同一codeS是在Android 5.1或pre版本完美运行列表
难道有谁知道原因??谢谢!
AM =(ActivityManager)的getContext()getSystemService(Context.ACTIVITY_SERVICE)。
清单< RunningAppProcessInfo>清单= am.getRunningAppProcesses();
解决方案
我觉得由于Android 5.1.1,Android的希望管理全部由自己的过程,所以getRunningAppProcesses()与第三方应用程序没有生意了。 ..
I try to invoke getRunningAppProcesses() on Android 5.1.1,but it return empty list or a list which only contain my application.But the same codes are running perfectly on Android 5.1 or on pre version.
Do anyone know the reason??Thanks!
am = (ActivityManager) getContext().getSystemService(Context.ACTIVITY_SERVICE);
List<RunningAppProcessInfo> list = am.getRunningAppProcesses();
解决方案
I think since Android 5.1.1, Android would like to manage the processes all by himself, so getRunningAppProcesses() has no business with third party applications any more...
这篇关于在Android 5.1.1调用getRunningAppProcesses问题()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文