Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background support for sensors APIs #73

Open
mkruisselbrink opened this issue Jan 15, 2016 · 2 comments
Open

Background support for sensors APIs #73

mkruisselbrink opened this issue Jan 15, 2016 · 2 comments
Milestone

Comments

@mkruisselbrink
Copy link

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?

@tobie
Copy link
Member

tobie commented Jan 15, 2016

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.

@riju
Copy link
Contributor

riju commented Aug 7, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants