-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
heartbeatInterval is not honored in background mode on Android and IOS and Need help in understanding .on("location") API. #354
Comments
What device make/model are you using? Vendor os can add their own battery-saving overrides to throttle timers. |
For Android: Samsung Galaxy S5. |
Samsung's Smart Manager can cause timers to throttle on Android. |
Can you please help in IOS case? Now it is taking more than 30mins. No location is posted to server when screen is locked but as soon as I turn on screen multiple locations are posted. |
I'm working on another issue reported about iOS heartbeat. I've confirmed that iOS 10 has made a change to throttle timers running in the background. Are you even listening to the |
I've written Listener with logging statement; Logs are printed fine in Android but that is not the case in IOS. Also location updation to server is taking a lot of time: started from 1min then 5mins then shifted to 15mins; Now it is taking more than 30mins in background mode (On IOS). On Android it is still stuck to 5mins. |
It's a very simple question: yes or no:
|
yes |
You are confused with Mauron85's plugin. The following config options are invalid:
Also, read the docs for the This plugin's bgGeo.configure(config, function(state) {
console.log('Plugin is configured and ready to use. Current state: ', state);
bgGeo.start(); // <--- start tracking
}); You need to forget what you learned about Mauron85 and start from scratch |
I've uninstalled that plugin. Now it is not there in my Now configuration object is like:
But Still the issue persists. I don't want to call Issue with Thanks. |
The plugin has not such config Did you read what I said above about iOS heartbeat?
You cannot count on a regular heartbeat occurring. I suggest you try adding a |
As Location update interval is 15mins on IOS; I tried to use .on("heartbeat")API with heartbeatInterval: 60 (60 secs).
It works fine in both IOS and Android in foreground and background mode; But There is one issue which I noticed recently; After some time Let us say 10mins; instead of firing heartbeat event after specified interval (60sec) It was firing it after much larger time (of 5minutes on Android and of 15mins on IOS).
Environment
Plugin version: 2.7.0
Platform: Android
OS version: 6
Cordova version (cordova -v): 6.5.0
Plugin config
Expected Behavior
heartbeat
event should be fired at specified interval always it should not be delayed.Actual Behavior
After some time Let us say 10mins; instead of firing heartbeat event after specified interval (60sec) It was firing it after much larger time of 5minutes.
Context
Implementing
.on("heartbeat")
listener.Also I need little help in understanding
.on("location")
API.As mentioned in documentation(https://github.com/transistorsoft/react-native-background-geolocation/blob/master/docs/README.md#location);
.on("location") will be fired as soon as new location is detected, That means on IOS it'll be fired too right? or will it be fired after 15mins(Interval for location update on IOS) only even if .on('location') is changed?
And what is the minimum distance needs to be travelled to trigger
.on('location')
?Thanks in advance.
The text was updated successfully, but these errors were encountered: