-
Notifications
You must be signed in to change notification settings - Fork 387
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
Subscription to location updates can lead to excessive battery usage #47
Comments
Hi @oonoo, You are correct, INTULocationManager runs with For the newer subscription API, there is currently no way to specify the desired accuracy, which would be required to let INTULocationManager know what kind of I definitely think that this would make a good enhancement: to add another API for starting a subscription, which includes a desired accuracy parameter. (The existing subscription API will continue to default to "best".) This will require a little bit of work, because internally, INTULocationManager will need to dynamically adjust the Does that make sense? If you'd like to submit a pull request with this enhancement, that would be great! Otherwise it may be something that can be included with the next release (alongside #45). |
Please take a look at the changes in be2dcee, I've implemented a new public API and some internal enhancements to support this! |
- Add a new public API for location update subscriptions that allows a specific desired accuracy to be requested. By default, subscriptions use the maximum accuracy of location services, however this comes at the cost of high power consumption and therefore battery drain. By passing a lower desired accuracy, INTULocationManager will automatically reduce the location services accuracy level if possible to conserve power. - Implement dynamic location services accuracy management, so that INTULocationManager automatically adjusts the location services accuracy level based on the requested desired accuracies of all active location requests. For example, if a location update subscription is using the lowest accuracy level, but a new location request comes in that has a higher desired accuracy level, INTULocationManager will automatically increase the location services accuracy until the second request has completed, at which point it will scale back the location services accuracy to conserve power. Closes intuit#47
If i make a subscription to get regular position updates, the requests are never emptied thus the location manager is always running. And it is always running in the mode desiredAccuracy kCLLocationAccuracyBest. But i don't need this accuracy which needs so much battery power. I have no option to change to desiredAccuracy.
The text was updated successfully, but these errors were encountered: