transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.54k stars 424 forks source link

Location authorization modal texts not updating #1991

Closed rabbiss closed 1 month ago

rabbiss commented 1 month ago

Your Environment

Using the demo app: https://github.com/transistorsoft/rn-background-geolocation-demo

Expected Behavior

Using the demo app's advanced mode backgroundPermissionRationale texts should be visible in the location authorization modal. Also the locationAuthorizationRequest when set to "whenInUse" should make this modal go away, now it doesn't -> "whenInUse" and "Always" constantly bring up the same modal.

Actual Behavior

Allow BGGeolocation -modal has the "[CHANGEME] This app collects location data for FEATURE X and FEATURE Y" texts even though backgroundPermissionRationale texts are configured. Also, changing the value of locationAuthorizationRequest between "whenInUse" and "Always" has no effect on the modal. Previously the modal did not appear when set to "whenInUse".

Steps to Reproduce

  1. Select Advanced App
  2. Press toggle button in the up right corner.
  3. Observer modal
  4. Change plugin config's locationAuthorizationRequest from "Always" to "WhenInUse"
  5. Retrace steps 1-3
christocracy commented 1 month ago

reset: false,

Do you know what this does?

rabbiss commented 1 month ago

If I'm reading the docs correctly it persists any previously set configuration. So changing the value of locationAuthorizationRequest has no effect? I'm curious, what's the use-case for setting this to false?

christocracy commented 1 month ago

The use-case is my demo app, which has a comprehensive “Settings” screen to control the plug-in Config. I don’t want .ready(config) to override the Settings screen changes I’ve set, each time the app is launched.

very few use-cases require reset: false.

Just delete that option from your Config (don’t event set it to true)