W3C home > Mailing lists > Public > public-device-apis@w3.org > May 2012

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

From: Tran, Dzung D <dzung.d.tran@intel.com>
Date: Wed, 9 May 2012 20:49:15 +0000
To: Doug Turner <dougt@mozilla.com>, Marcos Caceres <w3c@marcosc.com>
CC: Anssi Kostiainen <anssi.kostiainen@nokia.com>, "public-device-apis@w3.org public-device-apis@w3.org" <public-device-apis@w3.org>
Message-ID: <84BCA539DD96614691177EDA3CE4FF0546B10544@ORSMSX101.amr.corp.intel.com>
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.

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. 

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:32:37 UTC