accelerometer handling should take care about power management.

NEW
Unassigned

Status

()

Core
DOM
9 years ago
7 years ago

People

(Reporter: romaxa, Unassigned)

Tracking

(Blocks: 1 bug)

1.9.2 Branch
Other
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
Accelerometer API implementation should not read accelerometer state all the time, because it will drain battery very fast (device shaking in pocket).

Accelerometer checker must be suspended (no timers, no handlers) when browser goes to background, or device goes to IDLE state (screen is off or something like that).

Also it should not check values by timer, ionotify or similar API should handle Accelerometer state changes.

Comment 1

9 years ago
(In reply to comment #0)
> Accelerometer API implementation should not read accelerometer state all the
> time, because it will drain battery very fast (device shaking in pocket).
Well, there may very well be some application which wants to log all to values
accelerometer API gives, even when device is "idle".

> Also it should not check values by timer, ionotify or similar API should 
> handle Accelerometer state changes.
Sounds reasonable, though we probably don't want to dispatch an event every time
ionotify tells that the value has changed. The event dispatch might happen way too often. But perhaps nsIAccelerationListener should be called always.

But there are two separate bugs here. ionotify is about the linux implementation, the idle thing is generic.

I wonder if OSX has something similar to ionotify.

Comment 2

9 years ago
Btw, it has been proposed (webapps wg) to add idle state detection, 
which web apps could use. Unfortunately that brings in some obvious privacy
concerns.
You need to log in before you can comment on or make changes to this bug.