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

Background Location Traking is not working after phone restart.

Open Saliheen opened this issue 1 year ago • 9 comments

Your Environment

  • Plugin version: ^4.16.0
  • Platform: Android
  • OS version:
  • Device manufacturer / model:
  • React Native version (react-native -v): 0.72.6 Plugin config const state:State = await BackgroundGeolocation.ready({ // Debug reset: false, debug: true, logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE, transistorAuthorizationToken: token, // Geolocation desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH, distanceFilter: 5, stopTimeout: 10, // Permissions locationAuthorizationRequest: 'Always', backgroundPermissionRationale: { title: "Allow {applicationName} to access this device's location even when closed or not in use.", message: "This app collects location data to enable recording your trips to work and calculate distance-travelled.", positiveAction: 'Change to "{backgroundPermissionOptionLabel}"', negativeAction: 'Cancel' }, // HTTP & Persistence autoSync: true, maxDaysToPersist: 14, // Application stopOnTerminate: false, startOnBoot: true, enableHeadless: true });

Expected Behavior Background location tracking should start working automatically when I restart phone.

Actual Behavior

Background location tracking is not working after phone restart

Steps to Reproduce

I am using demo app for react native.

PASTE_YOUR_LOGS_HERE

Saliheen avatar Jun 04 '24 08:06 Saliheen

Unlock the phone after restart. Go outside for a walk of at least 200 meters.

christocracy avatar Jun 04 '24 08:06 christocracy

Unlock the phone after restart. Go outside for a walk of at least 200 meters.

I have restarted the phone and unclocked it. Then i have drived for 5 kilometers but background location tracking didnt start working. I have also used "Mock Locations" application but background location tracking didt start.

Saliheen avatar Jun 04 '24 08:06 Saliheen

The plug-in doesn’t engage from a mock location app.

The issue template asked you for device model. You don’t provide it.

see https://dontkillmyapp.com

christocracy avatar Jun 04 '24 08:06 christocracy

reset: false

Don’t use reset: false if you don’t know what it does. 99% of users should not use that.

christocracy avatar Jun 04 '24 08:06 christocracy

The plug-in doesn’t engage from a mock location app.

The issue template asked you for device model. You don’t provide it.

see https://dontkillmyapp.com

My device model is Infinix X682B

Saliheen avatar Jun 04 '24 09:06 Saliheen

See wiki “Debugging”. Learn to fetch plug-in logs using .emailLog.

see https://dontkillmyapp.com

christocracy avatar Jun 04 '24 12:06 christocracy

See wiki “Debugging”. Learn to fetch plug-in logs using .emailLog.

see https://dontkillmyapp.com

ok

Saliheen avatar Jun 04 '24 12:06 Saliheen

We have installed the app on five different phones and restarted each one. We then drove for more than 6 kilometers, but the background location tracking did not start. Additionally, we walked around 1 kilometer, but the background location tracking still did not activate. This feature is essential for our needs, and we require it as soon as possible. Could you please provide a solution or suggest a workaround? Thank you.

Saliheen avatar Jun 05 '24 05:06 Saliheen

See wiki “Debugging”. Learn to fetch plug-in logs via .emailLog method.

I’m fieldtesting daily with a variety of phones almost daily for 9 years. I experience no issues.

did you follow the directions and modify de ice settings according to https://dontkillmyapp.com?

christocracy avatar Jun 05 '24 08:06 christocracy

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jul 06 '24 01:07 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jul 20 '24 01:07 github-actions[bot]