Re: [sensors] Proximity Events

Basically yes.  You can think of a system where the proximity sensor is always on (in practice we don't do this).  When someone registers for an event, there is a state change from unknown->known.  We fire this as a proximity event to the registered event listener.

Doug

----- Original Message -----
From: "Dave Raggett" <dsr@w3.org>
To: public-device-apis@w3.org
Sent: Wednesday, May 16, 2012 12:36:27 PM
Subject: Re: [sensors] Proximity Events

On 16/05/12 19:56, Jonas Sicking wrote:
> Neither of these solutions seem acceptable to me. We should either:
> 
> * Add a on/off switch which allows the page to control if the property
> is being kept up to date. The switch would default to the "off" state.
> * Go with the same solution as the deviceproximity event.
> 
> I tend to think that the second solution is more consistent with other
> sensor solutions.

Perhaps we need to force an event for initialization purposes. The
sensor is only turned on when there is an event listener. When you add
an event listener the event is triggered to allow you to initialize your
app's behavior.

-- 
Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett

Received on Wednesday, 16 May 2012 19:41:24 UTC