2

I have Google Maps installed on my phone and it is usually fully stopped, because I don't want it to always run in the background, since I believe that it is draining the phone battery.

My question is regarding the actual status of the Google Maps app or service.

If you check an app's info there is a button "Force stop". I believe that it is only activated (meaning you can click it) when the app is somehow running. I noticed that the Google Maps app seems to get started in some way from time to time in the background, because the button gets enabled regularly.

However there is no such entry in the "Running" section for the list of apps in the android settings. Does someone know whether it is running or not if the button is enabled? Is there some way to check this by code? Is it supposed to be a service or an app?

I have tried using the getRunningAppProcesses and getRunningServices methods of the ActivityManager class, but can't find any entry that would correspond to the Google Maps app. So I guess it is hidden from the user?!

Marcell
  • 809
  • 8
  • 23

1 Answers1

0

This link may answer your question as to what is the proper way of getting the apps running in background. It suggests that using getRunningAppProcesses and getRunningServices methods are unreliable. Instead, you have to track the visibility of your app on your own via Activity.onPause() and Activity.onResume().

Community
  • 1
  • 1
gerardnimo
  • 1,444
  • 8
  • 10
  • Since it is Google Maps that I want to check, I believe that I can't use the proposed answers on the linked page, can I? – Marcell Dec 20 '15 at 19:14