W3C home > Mailing lists > Public > public-device-apis@w3.org > February 2010

Re: Publishing System Information API FPWD

From: Max Froumentin <maxfro@opera.com>
Date: Mon, 01 Feb 2010 11:51:05 +0100
Message-ID: <4B66B219.9010806@opera.com>
To: Thomas Roessler <tlr@w3.org>
CC: "Tran, Dzung D" <dzung.d.tran@intel.com>, "Nilsson, Claes1" <Claes1.Nilsson@sonyericsson.com>, "'Robin Berjon'" <robin@robineko.com>, "public-device-apis@w3.org" <public-device-apis@w3.org>
On 29/01/2010 19:02, Thomas Roessler wrote:
> On 29 Jan 2010, at 18:57, Tran, Dzung D wrote:
>
>> place away from where you would hold the device. On mobile phone
>> the proximity sensor is usually in front, but that does not
>> precluded a device from having one on the back. The one use case is
>> that the proximity sensor is in the front screen and you hold it up
>> to your face, the display goes dark to save power.
>>
>> I have suggested in my previous posting to add a parameter to
>> specify if the sensor is front or back.
>
> Is "front" or "back" really the information we're looking for?
>
> Or is "display is obscured", "device is sitting on the table" and the
> like the information we're after?
>
> It strikes me that for existing devices, we kind of know how to deal
> with a proximity sensor that notices an obscured display.  Perhaps we
> should leave it at that, and not introduce an API for an arbitrary
> proximity sensor of which we don't actually know what it measures.
>

Both iPhone and Android SDKs provide access to proximity sensor:
- On the iPhone, the developer has access to a property called
ProximityState, "a Boolean value indicating whether the proximity sensor
is close to the user (YES) or not (NO)." Thus, the API hides how the 
proximity is measured (in particular the number of sensors) and what 
proximity they measure, letting the developer assume it's "front" proximity.

- On Android, the Sensor class provides the "Proximity sensor distance 
measured in centimeters (Note that some proximity sensors only support a 
binary "close" or "far" measurement). That is more information than the 
iphone (there can be more than one sensor) but again there is no 
information on what/where they measure. The device-agnostic programmer 
is left to their own devices (ha ha, I couldn't resist...) as to 
guessing what proximity is reported.

So neither patform solves our problem of how to know what proximity the 
sensor measures, but they provides values regardless although as a 
result the use cases become very limited.

Max.
Received on Monday, 1 February 2010 10:52:08 UTC

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