Android Question Google map without permission?

yfleury

Active Member
Licensed User
Longtime User
I have a map and I don't need to know the position of the user.
I put on map some markers with and I latlnt is comming from database (from my server by jrdc2)

So, do I need permission if MyLocation is always set to false?
 
I think if you use the google maps SDK, the maps "engine" might still try to get the user's location even if your app doesn't need it, which will require the location "permission".

If the above turns out to be true, an idea to work around this might be to use a webview and display a google map using the web interface API and submit the markers via a kml file.
 
Last edited:
Upvote 0
Today I install and uninstall my app many times and the app is not ask permission for map. I will check on my phone if all permission is it uninstall at the same time of the app
 
Upvote 0
In the log tab the list permissions look like

permission.JPG


But the app is not asking permission after uninstall and reinstall
 
Upvote 0
OK I forget I have commented the part asking permission
Code: Copy
    For Each permission As String In Array(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION, Starter.rp.PERMISSION_ACCESS_COARSE_LOCATION)
        Starter.rp.CheckAndRequest(permission)
        Wait For Activity_PermissionResult (permission As String, Result As Boolean)
        If permission=Starter.rp.PERMISSION_ACCESS_FINE_LOCATION Then
            CallSubDelayed(Starter, "StartGPS")
        End If
        '        Log("permission " & permission & " = " & Result)
   
        If Result = False Then
            ToastMessageShow("No permission!", True)
            Activity.Finish
            Return
        End If
    Next
When theses code are commented, the app run like I want. When I uncomment these code, the app run like I want but it ask permission.

I never need position of device
 
Upvote 0
For Android 6.0+, it will only request permission from the user when your app tries to obtain their location. If your app doesn't try to obtain location, then it will NOT ask for permission.

But, when an Android 5.0 or lower user installs your app, it will show them that your app requires location permissions. However, if your app doesn't require location, then you might be able to hide these permissions by adding these lines to the manifest:
Code: Copy
RemovePermission(android.permission.ACCESS_COARSE_LOCATION)
RemovePermission(android.permission.ACCESS_FINE_LOCATION)
 
Upvote 0
Back
Top