On iOS at least you can allow an app access to location data only while the app is in use (or not at all). Not sure what the situation is on Android.
The iOS counterpart blocks location requests quietly when the app is in the background and allows them when the app is in the foreground.