I did some research but I couldn't find what I'm looking for.
I'm looking for different permissions to allow google map localisation access to my android application, I found this ACCESS_FINE_LOCATION
and ACCESS_COARSE_LOCATION
but I don't understand how to to make it work.
Check out this official website link that provides explanation about both permissions: https://developer.android.com/guide/topics/location/strategies.html#Permission
To quote:
In order to receive location updates from
NETWORK_PROVIDER
orGPS_PROVIDER
, you must request the user's permission by declaring either theACCESS_COARSE_LOCATION
orACCESS_FINE_LOCATION
permission, respectively, in your Android manifest file. Without these permissions, your application will fail at runtime when requesting location updates.If you are using both
NETWORK_PROVIDER
andGPS_PROVIDER
, then you need to request only the ACCESS_FINE_LOCATION permission, because it includes permission for both providers. Permission forACCESS_COARSE_LOCATION
allows access only toNETWORK_PROVIDER
.
This means, you will only need to use one of the two in your AndroidManifest.xml
depending on your needs as stated above.
Add the following to the manifest file and you should be good:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />