Richou / react-native-android-location-enabler

Display a GoogleMap like android popup to ask for user to enable location services if disabled
MIT License
209 stars 52 forks source link

ERR00 is showing on clicking OK button #7

Open mtx62 opened 6 years ago

mtx62 commented 6 years ago

Greetings, First of all thank you for this great react native library, The issue is when I test this library in Android Physical device, Always in the first time I will get denied if I select OK! and after that the library back to normal and works great,

I tested many times and the same result,

error message:

Error: denied
    at createErrorFromErrorData (b06a4d22-d319-4883-8…d-d43fd0168137:2023)
    at b06a4d22-d319-4883-8…d-d43fd0168137:1975
    at MessageQueue.__invokeCallback (b06a4d22-d319-4883-8…d-d43fd0168137:2417)
    at b06a4d22-d319-4883-8…d-d43fd0168137:2162
    at MessageQueue.__guardSafe (b06a4d22-d319-4883-8…d-d43fd0168137:2330)
    at MessageQueue.invokeCallbackAndReturnFlushedQueue (b06a4d22-d319-4883-8…d-d43fd0168137:2161)
    at debuggerWorker.js:72

my react info:

    "react": "^16.3.0-alpha.1",
    "react-native": "^0.54.2",

Best regards.

Richou commented 6 years ago

Hello ! That's wierd, I don't have the problem on my Android device, what is your device and your android version ? In your "build.gradle" which version of the buildToolsVersion and compileSdkVersion do you use ?

I've tried on Honor 8 with Android 7.0 With buildToolsVersion 27.0.3 and compileSdkVersion 27 and that worked.

Regards.

mtx62 commented 6 years ago

Hello My device info OnePlus 3T Android V 8.0.0

compileSdkVersion 23
    buildToolsVersion '23.0.1'

    defaultConfig {
        multiDexEnabled true
        minSdkVersion 16
        targetSdkVersion 25
    }

Thank you and the problem is noticed in first use only

Richou commented 6 years ago

Do you notice the same problem on an Emulator ?

binotm25 commented 5 years ago

I have the same error! But mine is not in the first run, its happening everytime. I have tried it both on emulator and a real device.

"react": "16.8.3", "react-native": "0.59.3", "react-native-android-location-enabler": "^1.0.8"

Error message on debug is as follows:

Error: denied at createErrorFromErrorData (ActivityIndicator.js:79) at AccessibilityInfo.android.js:66 at MessageQueue.invokeCallback (ReactNativeART.js:384) at blob:file:///84f26d63-7979-47bc-bc31-77605f9af9b3:2358 at MessageQueue.guard (ReactNativeART.js:291) at MessageQueue.invokeCallbackAndReturnFlushedQueue (ReactNativeART.js:139) at e (RNDebuggerWorker.js:1)

oas commented 5 years ago

Same here, it's happening every time. I'm running Android Q!

"react": "16.8.3", "react-native": "0.59.3", "react-native-android-location-enabler": "^1.0.8",

heltonandreazza commented 5 years ago

same here, it's happening every time running Android 6

"react": "16.8.6", "react-native": "0.59.9", "react-native-android-location-enabler": "^1.1.0",

It does work for Android 7+ tough.

Does someone has identified any solution yet?

Thanks in advance!!

osvaguillen commented 5 years ago

I am also having this problem, was someone able to find the solution to this?

binotm25 commented 5 years ago

I am using

"react": "16.8.3", "react-native": "0.59.8", "react-native-android-location-enabler":"^1.0.8"

and for that particular version the following play services versions worked perfectly and the error is not showing anymore.

implementation 'com.google.android.gms:play-services-base:15.0.1' implementation 'com.google.android.gms:play-services-maps:15.0.1' implementation 'com.google.android.gms:play-services-location:15.0.1'

Just change the version or paste it on the app/build.gradle

I also changed the googlePlayServicesVersion & androidMapsUtilsVersion in build.gradle in the android root location to the following

buildscript { ext { ......... googlePlayServicesVersion = "15.0.1" androidMapsUtilsVersion = "0.5+" } }

May be with the new updates the play services api versions may also have changed.

lachlan-apthletic commented 5 years ago

Same problem here. My root build.gradle file has the following Google Play service version:

ext {
    ...  
    googlePlayServicesVersion = "16+"
    ...
}

My package versions are

    "react": "16.6.3",
    "react-native": "^0.60.5",
    "react-native-android-location-enabler": "^1.2.0",

Not working on device with Android v10. Works fine on device with Android v8.

Debugging revealed that it enters the catch block and returns error code ERR00 when the user taps OK. The location is in fact switched on after pressing the OK button though.