sensors icon indicating copy to clipboard operation
sensors copied to clipboard

Background support for sensors APIs

Open mkruisselbrink opened this issue 9 years ago • 2 comments
trafficstars

Currently the sensors spec does not seem to really address if and how sensors could be used in background contexts (although I see there is issue #12 which mentions sensors should be at least exposed to service workers). Are more advanced background use cases considered to be in scope for the generic sensors API? I wrote up some thoughts and use cases on what I think using a sensor from the background means. Does any of that seem like something that could or should be part of (some version of) the generic sensors API?

mkruisselbrink avatar Jan 15 '16 00:01 mkruisselbrink

Thanks for the issue and use cases and thoughts on the topic.

This is unfortunately out of scope for V1. I'm keeping it open for V2.

tobie avatar Jan 15 '16 09:01 tobie

From the Android P documentation [1],

Limited access to sensors in background Android 9 limits the ability for background apps to access user input and sensor data. If your app is running in the background on a device running Android 9, the system applies the following restrictions to your app: Your app cannot access the microphone or camera. Sensors that use the continuous reporting mode, such as accelerometers and gyroscopes, don't receive events. Sensors that use the on-change or one-shot reporting modes don't receive events.

[1] https://developer.android.com/about/versions/pie/android-9.0-changes-all

riju avatar Aug 07 '18 08:08 riju