Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
813 views
in Technique[技术] by (71.8m points)

list - How to check all the running services in android?

I want to access and see how many and which services are running in background.

I want the exactly same functionality as we can access by

Menu->Setting->Applications->Running Services

on our android base mobile phones or tabs. Can anybody tell me what function or classes have been used in android source code to provide this functionality.

And if there is any way by which i can access this in-build list of background running services which i have mentioned above then please do tell me because its better for me to use in-build one instead of creating the whole new one.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Check This Link:

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


Where to Find Running Services in Android 6.0 Like I noted earlier, on

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.



与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...