Hey Christof,
We will put a draft version to MDN soon.
And as alphan said, you can use wake lock to keep gps awake. And just make
sure it's 'gps' instead of 'Gps' like below.
*window.navigator.requestWakeLock('gps')*
*Thanks.*
On Monday, 18 January 2016, Alphan Chen <[email protected]> wrote:
> Hi Christof,
>
> > Any ideas what the reason for this change could be? Was there a change
> > in Gecko?
> Yes, we phase in a change in Gecko.
> Bug 1216148 shows the whole story.
> The patch was phased in one weeks ago. (1/13)
>
> > And if so, what would an application have to do to prevent
> > GPS being turned off? Is there any resource lock to acquire to prevent
> > this?
> You need to use wakelock to keep GPS on.
> *window.navigator.requestWakeLock('Gps');*
>
> P.S. Ya-Chieh is modifying the content of MDN for this change currently.
>
>
> Alphan Chen 陳俊帆
> Software Engineer | Mozilla Taiwan
> Tel: +886-2-87861100#214 | Mobile: +886-937589694
> Email: [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');> | Skype: alphan102
>
> On Mon, Jan 18, 2016 at 2:54 AM, Christof Meerwald <[email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote:
>
>> Hi,
>>
>> I am using a ZTE Open C with nightly builds from
>> http://builds.firefoxos.mozfr.org/opencebay/ and am seeing a change in
>> behaviour for GPS when the screen is switched off.
>>
>> It used to be the case that an app would still receive GPS location
>> updates (using the navigator.geolocation.watchPosition API) when the
>> user turned the screen off. But with recent build (last week) it
>> appears that GPS is turned off when the user turns off the screen and
>> only turned on again when the user turns the screen back on (and it
>> takes a few seconds to get a new location via GPS).
>>
>> Any ideas what the reason for this change could be? Was there a change
>> in Gecko? And if so, what would an application have to do to prevent
>> GPS being turned off? Is there any resource lock to acquire to prevent
>> this?
>>
>>
>> Christof
>>
>> --
>>
>> http://cmeerw.org sip:cmeerw at cmeerw.org
>> mailto:cmeerw <javascript:_e(%7B%7D,'cvml','cmeerw');> at cmeerw.org
>> xmpp:cmeerw at cmeerw.org
>> _______________________________________________
>> dev-fxos mailing list
>> [email protected]
>> <javascript:_e(%7B%7D,'cvml','[email protected]');>
>> https://lists.mozilla.org/listinfo/dev-fxos
>>
>
>
_______________________________________________
dev-fxos mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-fxos