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

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

From: Anssi Kostiainen <anssi.kostiainen@nokia.com>
Date: Tue, 15 May 2012 10:23:57 +0300
Cc: "public-device-apis@w3.org public-device-apis@w3.org" <public-device-apis@w3.org>
Message-Id: <04DDD591-9369-4664-A306-1DAF2DB1A35B@nokia.com>
To: ext Marcos Caceres <w3c@marcosc.com>
On 9.5.2012, at 23.32, ext Marcos Caceres wrote:

> Hi Anssi,  
> Nice work on the spec… some comments…  

Thanks! Sorry for the late reply. I've been a bit overwhelmed by the number of replies.

> On Wednesday, May 9, 2012 at 1:15 PM, Anssi Kostiainen wrote:
>> [2] http://dvcs.w3.org/hg/dap/raw-file/tip/proximity/Overview.html
> Maybe reword the abstract to:
> "This specification defines a means to receive events that correspond to a proximity sensor detecting the presence of a physical object."

Your proposal sounds fine, I updated the abstract.

> Reliance on HTML5's definition of "Function" as a type might be risky. Please see proposal 2 here:     
> http://lists.w3.org/Archives/Public/public-script-coord/2012JanMar/0380.html

Many specs depend on [TreatNonCallableAsNull]. I wouldn't worry about this so early on. Thanks for the pointer anyway.

> IMO, this is too precise: "The current proximity is the distance between the hosting device and the nearby object, in centimeters."  

Do you have an alternative proposal in mind?

> So, if we are talking about the same sensor (the one that switches the screen off when you put the phone close to your face), then it might be good to amend the interface to tell you if it is near or far (as some sensors only report a binary near or far measurement). Something like:
> readonly attribute boolean near;  
> or  
> enum Proximity { "far", "near" };
> readonly attribute Proximity proximity;   

This is what I meant with the following issue I mentioned in the draft:


Specify another more abstract proximity event that fires only when the screen is close to the user's face as per Jonas' proposal.


Here's the related Bugzilla entry people interested in this may want to follow:


Received on Tuesday, 15 May 2012 07:24:34 UTC

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