android - 如何检查android中所有正在运行的服务?

标签 android list service background

我想访问并查看有多少服务以及哪些服务在后台运行。

我想要我们可以访问的完全相同的功能

菜单->设置->应用程序->运行服务

在我们的 android base 手机或平板电脑上。谁能告诉我在 android 源代码中使用了哪些函数或类来提供此功能。

如果我可以通过任何方式访问我上面提到的后台运行服务的内置列表,请务必告诉我,因为对我来说使用内置服务比创建内置服务更好全新的。

最佳答案

检查此链接:

How to Access Android’s List of Running Apps in 6.0 Marshmallow and Above


在 Android 6.0 中哪里可以找到正在运行的服务就像我之前提到的,在

Android 5.x and below, you could see what was going on by jumping in Settings > Apps > Running. This shows both running processes and services, along with how much memory (RAM) is being used by System and Apps, as well as how much is still available.


To find the same menu in Marshmallow, you’ll first need to enable Developer Options. Do this by heading into Settings, then About Phone.


Once there, find the Software info section—that will be a separate entry on some phones (Samsung, LG), but not on others, like Nexus devices. You’re looking for the Build Number, so you may have to poke around a bit before you find it. The first two images below were taken from the Samsung Galaxy S7 Edge, and the last one from the Nexus 6P. As you can see, the build is in two different places.



When you’ve found it, tap it seven times. You’ll see a toast notification letting you know how many are left until “you become a developer.” Once it’s been tapped seven times, a new menu will be unlocked just above About Phone in the main Settings menu.


Back in Settings, head into Developer Options. You should see “Running services” a little way down this menu—that’s what you’re looking for. Once you tap “Running services,” you should be presented with a familiar screen—it’s exactly the same one from Lollipop. Just in a different spot.


关于android - 如何检查android中所有正在运行的服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5523718/

相关文章:

android - 在Android中使用不同的按钮打开不同的网页

java - 定义异常类列表 - 类型不匹配错误

android - 定义流程时无法绑定(bind)到服务

python - 并排连接两个列表

python - 对列表元素进行 Grep

Android停止指定的IntentService

android - 在服务和 Activity 之间传递参数

Android ImageView 不总是显示图片

android - 将 Backendless API 与 Qt for Android 结合使用

android - 在 Android NDK 中编译 OpenCV