Android Question Location: Allow all the time

MotoMusher

Active Member
Licensed User
Longtime User
I need a way to prompt for "Allow all the time" for location permission for background tracking. A number of other apps are detecting it on my phone (S21) when it's set to "only while in use" and prompting for a change so there's a hook somewhere other apps are using.

I have followed the tutorials, and it's fine on the majority of phones in my user base, but some just won't work without "allow all the time". Most notably the Galaxy S10 series, but others as well. I have had a hundred + users solve the background tracking issues by changing the setting.

Target SDK is 29

B4X:
SetServiceAttribute(myapp, android:foregroundServiceType, "location")
AddPermission(android.permission.ACCESS_BACKGROUND_LOCATION)   
AddPermission(android.permission.ACCESS_FINE_LOCATION)

Even if there's no RuntimePermissions attribute, is there a way I can directly link the user in to the setting in my troubleshooting section so they can look and see if Location is set to "All the time" like the other apps are doing?
 

MotoMusher

Active Member
Licensed User
Longtime User
Yes, I do have a foreground service and have followed those links and others, and it does work for *most* users (1000+).

Well over 100 have had to move location to "All the time" to get it to work on their phones. Mostly Samsung phones, but not all. This results in me having to send LOTS of support emails to non-technical users about how to switch location to "all the time". (which fixes the issue, even though it "shouldn't" be necessary)

I see other apps prompting me (S21) as they are having issues as well. What I am looking for is how to set this prompt up, either through RP, or another method.
 
Upvote 0
Top