We don't want to add more options to the geolocation API.

I do agree with Jonas -- we can stop sending events to backgrounded
applications if we add a wake lock (?) for geolocation?  A side effect of
this could be to have system UI that shows that geo is being used in the
background.

Thoughts?



On Thu, Nov 5, 2015 at 7:44 PM Shawn Huang <shu...@mozilla.com> wrote:

> ​On behave of Ya-Chieh Wu <y...@mozilla.com>
>
> 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
> dev-geolocation@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-geolocation
>
_______________________________________________
dev-geolocation mailing list
dev-geolocation@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-geolocation

Reply via email to