RE: [sensors] Device Proximity (was: Device light and proximity sensor)

Also, What happens when a page register for the same event multiple times? 
Would you get multiple callbacks? I don't see a use case where you would want to do this, beside a programming mistake.

Thanks
Dzung Tran

-----Original Message-----
From: Doug Turner [mailto:dougt@mozilla.com] 
Sent: Wednesday, May 09, 2012 1:41 PM
To: Marcos Caceres
Cc: Anssi Kostiainen; public-device-apis@w3.org public-device-apis@w3.org
Subject: Re: [sensors] Device Proximity (was: Device light and proximity sensor)

Hi Marcos,

> readonly attribute boolean near;  
> 
> or  
> 
> enum Proximity { "far", "near" };
> readonly attribute Proximity proximity;   

Jonas asked me about this too.  With high resolution proximity sensors defining what far and near mean is going to be difficult.  I argued that if you have the min, max, value, and resolution you wouldn't need this.


> Lastly, there does not currently appear to be any normative text saying that the UA must only turn on the proximity sensor upon event registration (would suck if the sensor came on every time I open the browser, as it would just eat battery).

implementation detail.  it doesn't need to be spec'ed out.


> Also, it might be good to have a bit of text describing what happens when you switch tabs in a browser (i.e., stop the sensor)... common sense stuff, I know... :)  

UA policy. Happy with it as non-normative text, but lets not dictate this in the spec. 

Regards,
Doug

Received on Wednesday, 9 May 2012 20:49:46 UTC