react-native-background-geolocation icon indicating copy to clipboard operation
react-native-background-geolocation copied to clipboard

The config doesn't effect on the release mode

Open socheatleang opened this issue 2 years ago • 0 comments

Your Environment

  • Plugin version: 4.12.1
  • Platform: Android
  • OS version: All OS version
  • Device manufacturer / model: Android model
  • React Native version (react-native -v): 0.69.9
  • Plugin config
   await BackgroundGeolocation.ready({
      desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
      distanceFilter: 10,
      stopTimeout: 2,
      debug: false,
      logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
      stopOnTerminate: true,
      startOnBoot: true,
      batchSync: false,
      autoSync: false,
      locationAuthorizationRequest: 'WhenInUse',
      backgroundPermissionRationale: {
        title:
          "Allow the DEFIT App to access to this device's location in the background?",
        message:
          'In order to track your activity in the background, please enable "Allow all the time" location permission',
        positiveAction: 'Change to "Allow all the time"',
        negativeAction: 'Cancel',
      },
    }).catch((error) => {
      console.log({
        error,
    });
 });

Expected Behavior

The release mode must work the same of debug mode.

Actual Behavior

I have build and test with expo --dev-client version, It works as expected. However when I built release mode and upload to the google playstore in order to publish for internal testing. It won't work as expected.

It seems like the ready function above doesn't work properly. We able to let our user allow permission from WhenInUse app, but the app always asks for All all the time with the default message popup (see the attachment). https://app.screencast.com/2QhDb1WAVrVX7 .

Steps to Reproduce

  1. Expo build for .aab
  2. Upload to playstore with internal testing
  3. Download to physical device and open app to have a try

Context

  • I have double check the code and licence key.
  • I have tried to build by clean the cache during the build.
  • I have tried with different android phone

Debug logs

Logs
PASTE_YOUR_LOGS_HERE

socheatleang avatar Jul 14 '23 06:07 socheatleang