Skip to content
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

Allow page to provide hints as to data saver/power consumption mode #3

Open
markafoltz opened this issue Oct 5, 2017 · 1 comment

Comments

@markafoltz
Copy link

Location tracking in mobile platforms uses sensor fusion from GPS, WiFi, cellular signals, Bluetooth, etc. More accuracy requires more sensors and thus more power consumption. In addition, the platform may need to send and receive data to geomap sensor readings - I'm not sure.

Currently, there is a system-level setting in Android to allow the user to choose "High Accuracy", "Battery Saving" and "device only" mode for location from Google Location Services. (Go to Settings > Google > Location > Mode on a Nexus/Pixel device.)

For continuous location tracking, the page could request "power saving" mode to be more power saving friendly and allow the platform to throttle down the power consumption of the underlying location services.

Moreover, if the user agent is in "power saving" and/or "data saver" mode, sensor fusion may not be possible at all. If the page has requested "normal" mode and it's not allowed, we may want to inform the page through the API that it should expect less accurate and/or fewer readings.

@anssiko
Copy link
Member

anssiko commented Oct 9, 2017

Thanks! Another good issue to disseminate.

I think the highAccuracy flag of the Geolocation API might have been misused for this purpose, i.e. web developers might have inferred that true means higher power consumption, while false (default, although the prose is in conflict^1) would toggle on the "battery saving" mode. Being explicit with respect to the power consumption mode would probably be better assuming it is backed with a good use case.

If anyone is aware of other Web APIs that expose power saving mode we could draw inspiration from, let us know. Somewhat related proposal was made to the Battery Status API a while ago: w3c/battery#9 Also the Presentation API design was influenced by the requirement to make it power saving friendly, but the API does not expose any related knobs explicitly.

^1 The intended purpose of this attribute is to allow applications to inform the implementation that they do not require high accuracy geolocation fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants