my app needs to get access to the location only when it is in foreground. The goal is to record the gps position at moment the user clicks on a button.
The app was working fine for years but the apk is now refused by the play store due to "Background location access not declared" My intent is not to use location in background. So I guess something is wrong but I cannot find the issue.
In the Manifest, I have set ACCESS_FINE_LOCATION but not ACCESS_BACKGROUND_LOCATION
I have also tried <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" tools:node="remove" />
, but it does not help.
I am using the LocationManager class In my activity:
What am I missing?
After 1 week of working hard to find out what the problem was, sending messages to Google support (no answers), releasing different versions of my code in closed testing branches, filling again the policy form, etc... the problem disappeared by itself (no code change) this week-end.