Can someone who knows Android explain this to me because it sounds too awful to be true. Since recent Android only makes it easy to request location access (and likewise camera, mic) "while using the app", there's a hidden permission not in perms UI called "foreground service"...
Conversation
And, at least as I understand it, it allows the application to launch a "foreground service" to pretend it's still in the foreground after the user closes it, so it can retain location/camera/mic permission explicitly contrary to user consent.
3
Replying to
A foreground service is inherently tied to a notification which must be at least low priority by default which shows it in the status bar and on the lockscreen. The user can choose to hide the notification. There will still be a location indicator and history regardless.
2
2
Replying to
OK, that's at least something of a help. Why is this not documented in anything you can Google for?!
1
Replying to
It's documented here:
developer.android.com/guide/componen
You start a foreground service with startForegroundService instead of startService and then need to create a notification and pass it to startForeground or it doesn't get treated as an actual foreground service and then gets killed.
In order for it to be used to get allow while in use camera, microphone or location access it has to be statically declared as that type of service in the manifest. The only reason for the permission and the foreground service types needing to be declared is static analysis.

