W3C home > Mailing lists > Public > public-device-apis-log@w3.org > November 2016

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

From: Lukasz Olejnik via GitHub <sysbot+gh@w3.org>
Date: Tue, 15 Nov 2016 13:05:59 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-260635900-1479215157-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:53 UTC