且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何以编程方式显示在android中运行的进程?

更新时间:2023-01-18 07:37:37

http:// androidbite。 blogspot.in/2013/07/android-display-running-application.html [ ^ ]







见此链接
http://androidbite.blogspot.in/2013/07/android-display-running-application.html[^]



See this link


引用:

Android 5.0+ kill getRunningTasks(int)和getRunningAppProcesses()。这两种方法现在都已弃用,只返回调用者的应用程序进程。



Android 5.0引入了UsageStatsManager,可以访问设备使用历史记录和统计信息。此API需要权限android.permission.PACKAGE_USAGE_STATS,这是系统级权限,不会授予第三方应用程序。但是,声明权限意味着打算使用API​​,设备用户可以通过Settings应用程序授予权限。

Android 5.0+ killed getRunningTasks(int) and getRunningAppProcesses(). Both of these methods are now deprecated and only return the caller’s application process.

Android 5.0 introduced UsageStatsManager which provides access to device usage history and statistics. This API requires the permission android.permission.PACKAGE_USAGE_STATS, which is a system-level permission and will not be granted to third-party apps. However, declaring the permission implies intention to use the API and the user of the device can grant permission through the Settings application.





我发现这个库哪个可能支持版本6及以下的Android设备。



GitHub - jaredrummler / AndroidProcesses:已弃用 [ ^ ]



看看这是否有帮助。

如果您找到任何其他简化解决方案,请分享。



I found this library which may support android devices for versions 6 and below.

GitHub - jaredrummler/AndroidProcesses: DEPRECATED[^]

See if this helps.
Please share if you find any other simplified solutions.