Richou / react-native-android-location-enabler

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

I have Problem in android 12 #70

Closed zabipakdel closed 1 year ago

zabipakdel commented 2 years ago

I have Problem in android 12 permission will granted but will crash after that

vatsal-gadhiya-searce commented 2 years ago

@Richou I have the same issue in android 11 as well. Any update?

CptFabulouso commented 1 year ago

Do you have any log from the crash? What device did you use? I tried it on Samsung S22 with Android 12 and it works fine

zabipakdel commented 1 year ago

I found the solution https://github.com/rnmapbox/maps/issues/1286#issuecomment-805167752

CptFabulouso commented 1 year ago

So it was error in mapbox and not this lib? Or did you take something from that solution and applied patch for this lib?

zabipakdel commented 1 year ago

I just add this lines of code and works fine

It was fixed in mapbox several months ago but has not been updated in this library. A workaround is to add this line: implementation 'com.mapbox.mapboxsdk:mapbox-android-telemetry:6.1.0' to the @react-native-mapbox-gl/maps/android/rctmgl/build.gradle file under the implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.1.0 line.

CptFabulouso commented 1 year ago

ok, so it's mapbox issue, because it says to modify @react-native-mapbox-gl/maps/android/rctmgl/build.gradle file, for which you have to have that lib installed, it's not dependency of this lib. Thank you

zabipakdel commented 1 year ago

your welcome