transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.54k stars 424 forks source link

IOS says app is getting location in status bar even if not scheduled #1973

Closed mohammed-ask closed 1 day ago

mohammed-ask commented 1 month ago

simulator_screenshot_4CD64958-0B10-4BDB-B4CA-DAC308533906

Your Environment

Expected Behavior

IOS should not display airplane icon in status bar

Actual Behavior

IOS displaying airplane icon in status bar and saying my app it using location even when i have not set scheduled time of today when i use freeway drive

Steps to Reproduce

  1. Set any other schedule date
  2. Start freeway drive
  3. you will see airplane icon in status bar

Context

christocracy commented 1 month ago

Plugin version: ??

Config ??

Are you observing the logs in XCode?

Are you configuring the plug-in with debug: true and verbose logging so you can see and hear what the plug-in is doing?

see wiki “Debugging”

mohammed-ask commented 1 month ago

@christocracy Apologies for the delayed response. Currently, I'm using the latest version of the plug-in, which is 4.15.2. Upon checking the plug-in in debug mode, I noticed that when I use freeway drive and there's no scheduled time, it gives me a notification saying "Evaluate Schedule in SLC event" with an airplane icon above it. Is it possible to hide that airplane icon when tracking is not scheduled?

christocracy commented 1 month ago

"Evaluate Schedule in SLC event" with an airplane icon above it

It's a "location arrow" icon. This is expected when using a Config.schedule. The only way the plugin can periodically evalute the schedule is by subscribing to the iOS "SIgnificant Location Changes" API ("SLC"), where a location is recorded about every 1000 meters.

iOS does not have the ability to subscribe to a "Timer" to automatically launch your app in the background (even if terminated) to launch a scheduled tracking period. The iOS "SLC" API does.

mohammed-ask commented 1 month ago

@christocracy heyy sir, can you please have a look into the issue i posted recently, just wanna know if it has any solution or not.

christocracy commented 1 month ago

If you don’t want this behaviour, then don’t use a Config.schedule on iOS.

github-actions[bot] commented 2 weeks ago

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

github-actions[bot] commented 1 day ago

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