Closed
Bug 1093618
Opened 11 years ago
Closed 10 years ago
Disable GPS when not in use
Categories
(Core :: DOM: Geolocation, defect)
Tracking
()
RESOLVED
WORKSFORME
| tracking-b2g | backlog |
People
(Reporter: arogers, Unassigned)
References
Details
(Whiteboard: [ft:Peripherals])
User Story
As a user I want the GPS sensor to be disabled when they are not in use, or when an application that is using them moves to a background or idle state. This will save the battery powered required to power the sensor and process it's output.
No description provided.
Comment 1•11 years ago
|
||
If the app I use to record my GPS tracks moves into background, I'd be extremely annoyed when its use of GPS is being disabled. Same for FxStumbler. I run those *because* they record GPS positions even when they are in the background. Please make sure those use cases are not disturbed by power optimizations.
Updated•11 years ago
|
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → All
Comment 2•11 years ago
|
||
I am told this is proposed to be a 2.2 feature.
feature-b2g: --- → 2.2?
tracking-b2g:
--- → ?
Is there evidence to the contrary, that the GPS sensor stays active when not in use?
Based on cold-start times (where it takes a long time to get a GPS location if no GPS app has been used in a few hours) it appears the GPS is deactivated.
Comment 4•11 years ago
|
||
There are two requirements were described in #User Story.
- Disable GPS sensor when it's not in use.
- Disable GPS sensor when an application that is using GPS moves to background.
As far as I know, the 1st one is already supported by FxOS.
GonkGPSGeolocationProvider wouldn't be initialized if current location isn't be requested by any app.
Therefore, if a user haven't requested for geolocation for a long time, it would need a cold/warm start to get GPS location.
About the 2nd requirement, we can't just disable GPS when the app moves to background.
As Robert mentioned at #comment 1, sometimes it's reasonable for background app to use GPS sensor.
The power-saving behaviour depends the UX design.
(Adam has filed Bug 1098461 to track the UI behaviour.)
Comment 5•11 years ago
|
||
Since the 1st requirement is already in FFOS, based on Comment 4, please help to clarify: are we going to have a settings toggle to do the 2nd requirement? To give users the ability to disable all back ground app using GPS?
Also, to save power, there seems to be another way: for low and high accuracy, bug 1057083, have we considered this yet?
Flags: needinfo?(firefoxos-ux-bugzilla)
Flags: needinfo?(arogers)
Regarding bug 1057083, it is simple to implement, and it would reduce the amount of times the GPS gets activated. However, it isn't necessarily the same user story as this bug, which I am not that clear on.
The user story on this bug states they want a switch to disable the GPS when an app moves to background. We should be mindful that no such switch exists on iOS or Android. Apps themselves decide whether to stop/start listening to GPS onPause/onResume. This would be a unique feature, possibly a good feature, but may be unique to the point that only a tiny number of users would use/understand it.
A more typical settings switch (like iOS/Android) would be to select:
- GPS + Network Locations
- Network Locations only
(on the gonk gps provider, any requests for gps would be treated as network requests, I would think the implementation would be trivial, but some of this code is spaghetti-like so I can't say for sure)
The catch with this, is that our network location provider (Mozilla Location Services) is still a work-in-progress, and locations provided with the are rather rough.
| Reporter | ||
Comment 7•11 years ago
|
||
Agreed the first half of this user story is done.
Howie, yes we will have setting to disable/enable this feature - to allow the user to chose if they want the system to leave the GPS running even if they are not viewing the application. This is what puts the user in control of the system.
If they want to use something like MozStumbler, then they would want to enable background use of GPS.
Flags: needinfo?(arogers)
A few points:
1) This is a cart before the horse feature: we don't have the switch describe in comment 6 which is found in other mobile platforms : GPS + Network Locations vs Network Locations only. Before we add a 'disable GPS in background' switch we should do the common use-case switch first.
2) Concretely, what app is causing the problem?
If you download a GPS tracking app -that by-design runs in the background to get GPS location- that is a feature choice the developer made by using particular APIs to do so, and a choice the user made to download and use that app. Perhaps I am missing something here, and a particular app is a problem, or there is an API implementation problem that is causing background GPS to be active when it should not be.
3) Related to (3), my understanding is, lets modify run-time API behaviour of 3rd party apps based on a user preference, in a way that no other mobile OS does. Is there any precedent for non-developer settings switches that modify run-time API behaviours?
Comment 9•11 years ago
|
||
Adding alex to find out how bug 1089619 relates here.
Flags: needinfo?(lissyx+mozillians)
Comment 10•11 years ago
|
||
(In reply to Gregor Wagner [:gwagner] from comment #9)
> Adding alex to find out how bug 1089619 relates here.
Sorry, my titling for this bug may have been misleading, but the "less hungry" was related to abusing the Settings API, not from a power point of view.
Flags: needinfo?(lissyx+mozillians)
Comment 11•11 years ago
|
||
Kevin can you please ask Ken's team if this is committed for 2.2? (flag is updated)
Flags: needinfo?(khu)
Comment 12•11 years ago
|
||
Confirmed with product, this is in scope of 2.2. Peripherals team and system platform team (Gaia part) will handle this.
feature-b2g: 2.2? → 2.2+
Flags: needinfo?(khu)
Comment 13•11 years ago
|
||
(In reply to howie [:howie] from comment #12)
> Confirmed with product, this is in scope of 2.2. Peripherals team and system
> platform team (Gaia part) will handle this.
Thank you, Howie!
Comment 14•11 years ago
|
||
Flagging Jenny since comment #5 looks like it's about a Settings toggle.
Flags: needinfo?(firefoxos-ux-bugzilla) → needinfo?(jelee)
Updated•11 years ago
|
Whiteboard: [ft:Peripherals]
Comment 15•11 years ago
|
||
Hi there, per synced with Bruce, for 2.2 we will only provide a global switch to disable GPS when apps are running in background. In next (future) release, this feature should work per app based so that apps require background GPS can function properly. Thanks!
Flags: needinfo?(jelee)
Comment 16•11 years ago
|
||
Jenny, as per the proposal being put up on https://bugzilla.mozilla.org/show_bug.cgi?id=1097496, it seems complete Geolocation will be stopped if all apps are running in the background, i.e. the GonkGPSGeolocationProvider will receive a Shutdown from the nsGeolocationService.
From your comment 15, it sounds like we are only talking about disabling GPS sensor when an application goes into background.
Please confirm once more.
Comment 18•11 years ago
|
||
Redirect the question to Bruce.
Hi Bruce, can you take a look at comment 16 and confirm? Thanks!
Flags: needinfo?(jelee) → needinfo?(bhuang)
Comment 20•10 years ago
|
||
I didn't get an answer to Comment 8. Essentially, I am questioning if this feature serves only to mask a bug.
If GPS (or network geolocation) is not disabled when no longer used, then this is a bug. The geolocation service should have a few second timeout after which if no other app is using it, it shuts down.
I think this is where the timeout is connected:
http://dxr.mozilla.org/mozilla-central/source/dom/geolocation/nsGeolocation.cpp#1026
If there is some app that is continuously using the geolocation service when it shouldn't be, then this could be the bug you are seeing.
Comment 21•10 years ago
|
||
Defer to engineering for comment #8 response, but also reiterate Howie's comment #19 that as far as we know, this is no longer in scope for 2.2 based on recent priority changes.
Comment 22•10 years ago
|
||
This bug should be closed, and the bug for "I did this, and the GPS stayed enabled incorrectly" should be filed.
I am at a loss to think of why the GPS would ever be active in the background if the user wasn't explicitly using a navigation app.
Comment 23•10 years ago
|
||
This is the currently expected behavior. If this is reproducible, then a new bug with STR should be filed.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Updated•10 years ago
|
Flags: needinfo?(bhuang)
You need to log in
before you can comment on or make changes to this bug.
Description
•