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

Background recording is not working in android 12

Open sunilinus12 opened this issue 2 years ago • 2 comments

Background recording is not working in Android 12. hi,I am seeing that this package is not working in Android 12 when it is in the background while on all other devices it is working fine properly but in Android 12 the app is closing itself any idea sir why is this happening is this issue of android 12 or is it package issue Kindly help me to solve it.

  • Plugin version:4.12.1
  • Platform: Android
  • OS version: 12
  • Device manufacturer/model: Samsung,Vivo
  • React Native version (react-native -v):0.64.2
  • Plugin config

config = { logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE, useSignificantChangesOnly: false, preventSuspend: false, foreground service: true, persistMode: BackgroundGeolocation.PERSIST_MODE_ALL, desired accuracy: Platform.OS === "ios" ? BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION : BackgroundGeolocation.DESIRED_ACCURACY_HIGH, disableElasticity: false, distance filter: 19, stationaryRadius: 22, heartbeat interval: 30, debug: false, // Android locationUpdateInterval: 4500, notification: { title: "recoridng", text: "Recording your location", }, stop timeout: 60, pausesLocationUpdatesAutomatically: false, disableStopDetection: true, fastestLocationUpdateInterval: 4500, activityType: BackgroundGeolocation.ACTIVITY_TYPE_FITNESS, };

It should record the location in the background in Android 12.

It Doesn't record the location in the background in Android 12 .

  1. Just start the background package
  2. will start to record the location in the foreground
  3. Put the app in the background the location update will stop .

Am trying to record the location continuously.

sunilinus12 avatar Jul 05 '23 16:07 sunilinus12

Please learn to syntax highlight multi-line code blocks. It's easy.

See Wiki

  • Debugging
  • Philosophy of Operation
  • https://dontkillmyapp.com

Here are the Android devices I regularly test upon (including two Android 13 devices):

  • Nexus 4 @ 4.4.4
  • Nexus 5 @ 6.0.1
  • Motorola Moto G @ 6.0.0
  • Google Pixel @ 10
  • Google Pixel 3a @ 12
  • Google Pixel 6 @ 13
  • Samsung Galaxy S20 FE @ 13
  • Samsung J @ 6.0.1
  • Samsung A510 @ 8.0.0
  • Huawei P20 Lite (ANE-LX3) @ 8.0.0
  • Huawei Nova 9 SE (JLN-LX1) @ EMUI 12.0.1
  • Huawei P40 Lite (JNY-LX1) @ EMUI ???
  • XIAOMI MI A2 Lite @ 10.0.0
  • Nokia TA-1027 @ 8.0.0
  • OnePlus A5010 @ 9.0.0

christocracy avatar Jul 05 '23 16:07 christocracy

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

github-actions[bot] avatar May 19 '24 01:05 github-actions[bot]

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

github-actions[bot] avatar Jun 02 '24 01:06 github-actions[bot]