webyonet / react-native-android-location-services-dialog-box

React Native Android Location Services Dialog Box
MIT License
182 stars 50 forks source link

"gps" location provider requires ACCESS_FINE_LOCATION permission. #64

Closed renehauck closed 6 years ago

renehauck commented 6 years ago

Hi, first of all, thank you for your work.
After an update I recently got the error :
Looks like the app doesn't have the permission to access location.

Add the following line to your app's AndroidManifest.xml:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

"gps" location provider requires ACCESS_FINE_LOCATION permission.
throwLocationPermissionMissing
    LocationModule.java:234
startObserving
    LocationModule.java:173
invoke
    Method.java
invoke
    JavaMethodWrapper.java:372
invoke
    JavaModuleWrapper.java:160
run
    NativeRunnable.java
handleCallback
    Handler.java:873
dispatchMessage
    Handler.java:99
dispatchMessage
    MessageQueueThreadHandler.java:29
loop
    Looper.java:193
run
    MessageQueueThreadImpl.java:192
run
    Thread.java:764

But I have in my AndroidManifest the line <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />. Is this a bug or am I doing something wrong?

webyonet commented 6 years ago

this setting is already in this module. delete this permission from your own AndroidManifest.xml and try again?

renehauck commented 6 years ago

I deleted the permission, but unfortunately I still have the same error. :disappointed:

renehauck commented 6 years ago

Ok, I found the error, a service of mine tried to access the position before the authorization was checked. Thank you :-)