Frequent high accuracy updates while the user interacts with other apps
Example: A navigation or fitness app that continues to work when the user either turns off the screen or opens a different app.
Use a foreground service. If expensive work is potentially going to be done by your app on behalf of the user, making the user aware of that work is a recommended best practice. A foreground service requires a persistent notification. For more information, see Notifications Overview.