-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no permission prompts when calling startGeofences #1867
Comments
You are not showing any call to .ready(config). You must wait until .ready(config) resolves before calling .start() / .startGeofences() |
I updated the code examples. |
Are you attempting to launch a release build without a license key? |
I'm running expo development build (which is a Debug build): https://docs.expo.dev/develop/development-builds/introduction/ I'll try a release build with licence key to see if behaves differently. Also same code used to work with 4.12.1, on Android 13 and Expo SDK 48 (I have some additional dependencies added). |
I suggest you observe unfiltered |
In the logs it looks like it triggers some kind of permission request, but I think it is closed immediately. Logs
|
I have no idea what your problem is and none of those logs reference anything from the plug-in. I suggest you experiment with the plug-in in a fresh new HelloWorld app. |
Everything works as expected in release build. It seems that expo development build which used to be a debug build before, does not work anymore without a license Looks like
|
You will have to consult with Expo docs to figure out why you're not getting a debug build. |
What flag is used internally to detect debug build by react-native-background-geolocation? nevermind, found it
|
Consulted with Expo team member, and the debug build is created as expected with gradlew :app:assembleDebug expo/eas-cli#2105 (comment) |
Your Environment
react-native -v
): 0.72.6,Expected Behavior
Application should ask background location permissions when
BackgroundGeolocation.startGeofences
is called.Actual Behavior
results in
ReactNativeJS: 'failed to start', 'Permission denied'
, no permission dialogs shown at all.Calling
const permission = await BackgroundGeolocation.requestPermission()
results in 2, meaning
BackgroundGeolocation.AUTHORIZATION_STATUS_DENIED
Steps to Reproduce
BackgroundGeolocation.startGeofences
Context
Even when I ask permissions with expo-locations, for foreground and background location, calling BackgroundGeolocation.requestPermission() still returns 2.
This issue also occurs without expo-locations package being installed.
Let me know if you need some more info.
Debug logs
Logs
The text was updated successfully, but these errors were encountered: