Re: [sensors] Should we request permission when sensor is not supported by the platform?

Asking (to see if a sensor exists) for a permission to ask for a 
permission (to use the sensor) sounds non-optimal :)

Seriously, why not just ask for permission once? 

1. Platform supports a sensor API? Fine, let's try to use it
2. Ask for permission
3. Granted. Good! Let's see how it works 
4. Listen for new data, so:
- either leave the app to forever listen for data (because no sensor 
is there, no data ever shows up; also, what if at some point in the 
future some device types will have manual switches to turn off a 
sensor?), or
- allow a webdev to see if the sensor is actually functioning, e.g. 
signal that a sensor is not working (a flag, or a frequency of 0, or 
so)?

I would **not** distinguish between _permission denied_ and _no 
available sensor_. 

-- 
GitHub Notification of comment by lknik
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/145#issuecomment-260635900 using
 your GitHub account

Received on Tuesday, 15 November 2016 13:06:10 UTC