Android Question ACCESS_BACKGROUND_LOCATION - From the beginning google rejects my app

Michael Müller Anywhere

Member
Licensed User
Longtime User
From the beginning google rejects my app from the playstore.

The app uses geolocation in background (Service LocationMonitor and FusedLocationProvider). That is also the only purpose of the app. It is for members of the emergency services and fire brigade. So the control center can see where the members are at this moment. If I want to publish it, google answer as follows:


Manifest:
SetServiceAttribute(LocationMonitor, android:foregroundServiceType, "location")
AddPermission(android.permission.ACCESS_BACKGROUND_LOCATION)

Activity_Create:
Sub Activity_Create(FirstTime As Boolean)
dim s as String
    If FirstTime Then
        If Starter.rp.Check(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION) = False Then
            Dim s As String
            s = "Diese APP fragt nach der Erlaubnis zur Standortermittlung." & CRLF
            s = s & "Diese APP ermöglich eine Standortermittlung " & CRLF
            s = s & "1) im Vordergrund, wenn der Benutzer den Button <Position senden> anklickt " & CRLF
            s = s & "2) im Hintergrund, "
            s = s & "auch wenn die APP gerade nicht sichtbar ist oder " & CRLF
            s = s & "nicht benutzt wird oder der Bildschirm deaktiviert ist." & CRLF  & CRLF
            s = s & "Diese Option lässt sich in den Einstellungen ein- und abschalten." & CRLF & CRLF
            s = s & "Die Standortermittlung dient dazu, "
            s = s & "den Standort des Benutzers innerhalb eines Einsatzgeschehens automatisiert an die "
            s = s & "Lunasoft Lagekarte zu übertragen."
            
            'no sync
            'show before permission
            Msgbox( s, "Erklärung zur Standortermittlung")
        End If

        Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)
    End If


I believe that I am doing something wrong somewhere. I've been looking for the bug for 3 weeks now.
Anyone have an idea?
Thanks very much.
 

agraham

Expert
Licensed User
Longtime User
must display a prominent disclosure through a pop-up alert before your app’s location runtime permission
You are showing it after requesting permission.
EDIT: My bad I see you are trying to Check rather than CheckAnd Request. However maybe Google doesn't see it that way. I would try it a different way, remove the check, show the Msgbox and then do a CheckAndRequest just to see if that is the problem. Also you should be using MsgboxAsync as Msgbox is deprecated and can cause problems.
 
Last edited:
Upvote 0

JohnC

Expert
Licensed User
Longtime User

I know your wording is very similar, but remember, this rejection message from google is probably being generated by a code scanner, and not a human. So, when google says "include at least the following sentence", then I would recommend including that EXACT sentence.

So, add this sentence:

"This app collects location data to enable the Send Location feature as well as background location tracking for the Lumasoft situation map even when the app is closed or not in use."

I would also include the above sentence in english in your app - do not translate it - because the google scanner may not be translating it properly and reject the app again because it did not find that exact sentence in your app.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…