​On behave of Ya-Chieh Wu <[email protected]>

Bugzilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=1216148

Symptom:
There is no specific way to indicate if an application wants to use GPS in
the background. Currently, we don’t stop GPS when application goes to
background which might result in increase in battery use. On Android and
iOS, getting GPS in the background is not a default behavior.


Summarize the solutions which we brought up here or in Bugzilla before:

(1)add a geolocation choice in wakeLock [1]

window.navigator.requestWakeLock(type)
var lock = window.navigator.requestWakeLock('screen’);
lock.unlock();


(2)add a property in PositionOptions [2]
runInBackground = true, //default is false


id = navigator.geolocation.watchPosition(success, error, options);
options = {
  enableHighAccuracy: false,  //default: false
  timeout: 5000,   //default: Infinity
  maximumAge: 0  //default: Infinity
 };

[1]
https://groups.google.com/forum/#!searchin/mozilla.dev.geolocation/Backgrounded$20apps$20using$20GPS$20|sort:relevance/mozilla.dev.geolocation/UXkd3Tz1GPc/BtqtJ81Wi2YJ

[2]https://bugzilla.mozilla.org/show_bug.cgi?id=1216148#c6



 any other suggestion to contribute this API ?





-- 
Regards,
Shawn Huang
_______________________________________________
dev-geolocation mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-geolocation

Reply via email to