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

Re: [sensors] Proximity Events

From: Doug Turner <dougt@mozilla.com>
Date: Wed, 16 May 2012 12:40:50 -0700 (PDT)
To: Dave Raggett <dsr@w3.org>
Cc: public-device-apis@w3.org
Message-ID: <1934423786.1053191.1337197250888.JavaMail.root@mozilla.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 16 May 2012 19:41:25 GMT