mauron85 / react-native-background-geolocation

Background and foreground geolocation plugin for React Native. Tracks user when app is running in background.
Apache License 2.0
1.33k stars 561 forks source link

Blue indicator visible even after service is stopped #515

Closed artmerlop closed 3 years ago

artmerlop commented 3 years ago

Your Environment

locationProvider: BackgroundGeolocation.RAW_PROVIDER, desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY, stationaryRadius: 5, distanceFilter: 5, debug: false, startForeground: false, stopOnStillActivity: false, stopOnTerminate: true, maxLocations: 1000, syncThreshold: 100, url: api, postTemplate: { accuracy: '@accuracy', altitude: '@altitude', altitudeAccuracy: '@altitudeAccuracy', latitude: '@latitude', longitude: '@longitude', speed: '@speed', time: '@time' }

Context

The applications keeps showing blue indicator on status bar even if the service is stopped, on background and foreground.

Expected Behavior

When the service is stopped there should be no indicator, since the app is not processing any location update, when the permissions are "While in use"..

Actual Behavior

The applications keeps showing blue indicator on status bar even if the service is stopped, on background and foreground, to be more specific if you start a process with this new configuration:

stopOnTerminate = false startForeground = true

And then return to:

stopOnTerminate = true startForeground = false

And run stop() function, the status bar is still showing the blue indicator that the app is using the device location, when the permissions are "While in use".

Possible Fix

Steps to Reproduce

1. 2. 3. 4.

Context

Debug logs

walterdl commented 3 years ago

@artmerlop how did you solved it?