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

Re: [sensors] Proximity Events

From: Anssi Kostiainen <anssi.kostiainen@nokia.com>
Date: Wed, 16 May 2012 09:37:36 +0300
Cc: "public-device-apis@w3.org public-device-apis@w3.org" <public-device-apis@w3.org>
Message-Id: <3E7C1ABF-015B-4CA2-B726-4195C6B0DFF7@nokia.com>
To: "ext Tran, Dzung D" <dzung.d.tran@intel.com>
Hi,

On 16.5.2012, at 8.28, ext Tran, Dzung D wrote:

> Also in this spec that user proximity should ever set to "unknown", why would this you get an event that set this to unknown unless the sensor is faulty? Then what happens? Will you keep getting "unknown". My opinion is that you will only toggle between near and far and vice versa. If the UA can't determine, then you will not get an event.

You have to define a default value for the attribute because some implementations may be unable to report the state when the parent object is created (the same reason as in the Battery Status API). And neither "near" nor "far" provided a sensible default value. I agree that "unknown" is not an optimal name, so I renamed it to "uninitialized" (e.g. the DataTransfer interface uses the same name, so there's some precedence for it on the Web platform).

The reason for going with a similar design for the "user proximity" as in the Battery Status API (and consequently different from the "device proximity") is that people came up with sensible use cases that required such a design. See e.g.:

  http://www.w3.org/mid/33799BBF-7033-46F6-94FA-53B36185E164@berjon.com

-Anssi
Received on Wednesday, 16 May 2012 06:38:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 16 May 2012 06:38:13 GMT