React-native-background-geolocation: On location event not triggering on android

Created on 18 Nov 2019  路  4Comments  路  Source: mauron85/react-native-background-geolocation


Your Environment


  • Plugin version: 0.5.0
  • Platform: Android
  • OS version: 10
  • Device manufacturer and model: Redmi 8 pro, Samsung j7
  • Running in Simulator: yes
  • React Native version: 0.55.4
  • Plugin configuration options: `

BackgroundGeolocation.configure({
locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDER,
desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY,
stationaryRadius: 50,
distanceFilter: 100,
notificationTitle: '',
notificationText: 'enabled',
notificationsEnabled: false,
debug: true,
startOnBoot: false,
stopOnTerminate: false,
fastestInterval: 10000,
activitiesInterval: 10000,
stopOnStillActivity: false,
});

`

  • Link to your project:

Context


On location event only trigger while app opened. Not trigger while location onchange. This used to be smooth, spontaneously broken.

Expected Behavior


On location event function should be trigger while location onchange

Actual Behavior


On location event not triggering while location onchange

Possible Fix

Steps to Reproduce



1.
2.
3.
4.

Context

Debug logs

stale

Most helpful comment

Dealing with exactly the same problem, but I was using locationProvider: BackgroundGeolocation.RAW_PROVIDER because it was necessary for iOS. On Android, I was not receiving location updates. Switched to locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDER on Android resolved this issue for me.

All 4 comments

Dealing with exactly the same problem, but I was using locationProvider: BackgroundGeolocation.RAW_PROVIDER because it was necessary for iOS. On Android, I was not receiving location updates. Switched to locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDER on Android resolved this issue for me.

Same issue using : locationProvider: BackgroundGeolocation.RAW_PROVIDER

As JorenVos said: switched to locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDERon Android resolved this issue for me.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed, because it has not had recent activity. If you believe this issue shouldn't be closed, please reopen or write down a comment requesting issue reopening with explanation why you think it's important. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikailbayram picture mikailbayram  路  4Comments

vendramini picture vendramini  路  3Comments

theebi picture theebi  路  4Comments

pewh picture pewh  路  6Comments

arochedy picture arochedy  路  5Comments