GPS stops with "maximumAge: 0" in HTML5 geolocation

Bug #1592098 reported by costales
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Oxide
New
Undecided
Unassigned

Bug Description

Hi!

If I use this:
 navigator.geolocation.watchPosition(
 function (pos) {
  console.log('new pos');
 },
 function (error) {
  console.log(error.code == 1);
 },
 {
  enableHighAccuracy: true,
  maximumAge: 0
 }

The GPS will not give more new positions after X kilometers (so random), because of the "maximumAge" parameter (I put 0 because I don't want older positions).

We see the behavior in the current version of uNav (0.59). After remove that command, the GPS never stops.

I think it could be from oxide, because there isn't dumps in the log and if I kill the app and launch again, the GPS works again.

Thanks in advance!

Revision history for this message
David Barth (dbarth) wrote :

It looks similar to bug #1551686

Revision history for this message
Alberto Mardegan (mardy) wrote :

A spent a bit of time investigating this report, and I believe that, if indeed there's a bug, that's in Oxide: the handling of maximumAge happens entirely in the Oxide/Chromium code, because the maximumAge parameter is not even being passed to the location service.

In any case this is puzzling because maximumAge default value is already 0, so setting it to 0 shouldn't have any effect at all.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

maximumAge is a red herring. It only effects the behaviour of the initial location (ie, setting it to zero means the app has to wait for the first location update. Setting it to non-zero means the application gets a cached location before the first location update if it's not too old)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.