On Sunday, July 13, 2014 5:34:53 PM UTC+2, Jonas Sicking wrote: > Yes, I would say this is on purpose. > > In part I think it's good to keep a bit of separation of concerns here. The > idea of a CPU lock was to enable applications to perform plain data > processing in the background. > > Allowing sensors to run has some privacy implications, so it's good if we > don't have to worry about those when we hand out ability to hold CPU > wakelocks. > > Finally, the vibration API was never intended to be used as a notification > mechanism, but rather as just additional output in addition to audio and > video, especially for games. Notifications were intended to be handled by the > notification API, although that definitely has much less control over the > vibration pattern. Maybe we should fix that. > > > Can I ask what type of thing you are trying to build? > > We do actually have a permission for "ability to use sensor API even in > background". That permission should give you ability to use sensors while > holding the CPU lock. Though the permission might only be granted to > privileged apps. And I'm not sure its used much so might no longer work. > > > / Jonas
In general I'd say for stuff like navigation apps if you're on bike. Makes no sense to have the screen on in that case, but I would want data from the GPS and maybe use vibrate to notify users when they need to turn. Or an app like Moves that tracks what you're doing (biking, cycling, anything). We can run it in the background through alarms but can't track anything. A permission would make sense I think. _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
