Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Time/Clock API
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  22 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mounir Lamouri  
View profile  
 More options Mar 30 2012, 6:19 pm
Newsgroups: mozilla.dev.webapi
From: Mounir Lamouri <mou...@lamouri.fr>
Date: Fri, 30 Mar 2012 15:19:47 -0700
Local: Fri, Mar 30 2012 6:19 pm
Subject: Time/Clock API
Hi,

Following bug 714357 and bug 714358 discussions, I would like to propose
an API for Time/Clock (we should keep one word I guess).

There are six things we want to handle:
1. set time
2. get time
3. set timezone
4. get timezone
5. be informed when time is changed
6. be informed when timezone changes

1. Set time
We can have a navigator.time.set() method that will either take a double
that will be the number of milliseconds since epoch in the current
timezone or a Date object. The system time will then be replaced.

ISSUES:
I can think of two questions: should we take the epoch double in UTC
timezone (I guess not but better to ask) and how should we behave if the
Date object isn't in the same timezone the system currently is? Could
that actually happen unless the timezone has been changed in the
meantime? If not, we could just throw/ignore. Otherwise, we should
define a behavior.

2. Get time
Use Date.

3/4. Set/Get Timezone
We should use the Settings API to do that.

5. Time change
We should fire a change event to navigator.time.
That event should fire if the timezone has been changed or the time has
been changed manually. It should not be fired every ms ;)

6. Timezone change
The settings API should allow you to listen to changes.

The API would look like that:

interface TimeManager {
  void set(Date time);
  void set(double time);

  attribute Function? onchange;

};

interface NavigatorTime {
  readonly attribute TimeManager time;

};

interface Navigator implements NavigatorTime;

Any feedback?

Thanks,
--
Mounir


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Ascher  
View profile  
 More options Mar 30 2012, 6:26 pm
Newsgroups: mozilla.dev.webapi
From: David Ascher <dasc...@mozilla.com>
Date: Fri, 30 Mar 2012 15:26:52 -0700
Local: Fri, Mar 30 2012 6:26 pm
Subject: Re: Time/Clock API
On Mar 30 '12 3:19 PM, Mounir Lamouri wrote:

> Hi,

> Following bug 714357 and bug 714358 discussions, I would like to propose
> an API for Time/Clock (we should keep one word I guess).

> Any feedback?

I recently ran into a weird problem w/ an iOS device with a dying
battery, and I learned that iOS doesn't have an NTP client and expects
to have the time drift corrected by syncing w/ iTunes.  It made me wish
that iOS had a "set-time" API.

I doubt it's a P1, but figuring out who gets to set the time turned out
surprising.

--da


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mounir Lamouri  
View profile  
 More options Mar 30 2012, 6:46 pm
Newsgroups: mozilla.dev.webapi
From: Mounir Lamouri <mou...@lamouri.fr>
Date: Fri, 30 Mar 2012 15:46:24 -0700
Local: Fri, Mar 30 2012 6:46 pm
Subject: Re: Time/Clock API
On 03/30/2012 03:26 PM, David Ascher wrote:

Luckily, iOS isn't a target. But in general, I believe we should return
undefined if TimeManager isn't implemented for the currenty system.
On Android we could implement that [1] (but that would require
permissions we are not going to ask) and we could easily implement that
for B2G too. I guess changing the system time and timezone would be
doable in major desktop OSes (Windows, MacOS and GNU/Linux) but I'm not
sure the change event would be easily implementable.

[1] developer.android.com/reference/android/app/AlarmManager.html

--
Mounir


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabien Cazenave  
View profile  
 More options Mar 31 2012, 3:56 am
Newsgroups: mozilla.dev.webapi
From: Fabien Cazenave <fab...@cazenave.cc>
Date: Sat, 31 Mar 2012 09:56:54 +0200
Local: Sat, Mar 31 2012 3:56 am
Subject: Re: Time/Clock API
Le 31/03/2012 00:19, Mounir Lamouri a écrit :

> Hi,

> Following bug 714357 and bug 714358 discussions, I would like to propose
> an API for Time/Clock (we should keep one word I guess).

> There are six things we want to handle:
> 1. set time
> 2. get time
> 3. set timezone
> 4. get timezone
> 5. be informed when time is changed
> 6. be informed when timezone changes

My 2˘: let’s call it “Clock API” and add an “alarm” object to it.

At the moment we don’t have any proper way (afaik) to set an alarm in
b2g/gaia… last time I checked we were using a setTimeout() for that.
I think it’d be nice to handle an array of alarms and attach callbacks
to each alarm.

:kazé


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabien Cazenave  
View profile  
 More options Mar 31 2012, 3:56 am
Newsgroups: mozilla.dev.webapi
From: Fabien Cazenave <fab...@cazenave.cc>
Date: Sat, 31 Mar 2012 09:56:54 +0200
Local: Sat, Mar 31 2012 3:56 am
Subject: Re: Time/Clock API
Le 31/03/2012 00:19, Mounir Lamouri a écrit :

> Hi,

> Following bug 714357 and bug 714358 discussions, I would like to propose
> an API for Time/Clock (we should keep one word I guess).

> There are six things we want to handle:
> 1. set time
> 2. get time
> 3. set timezone
> 4. get timezone
> 5. be informed when time is changed
> 6. be informed when timezone changes

My 2˘: let’s call it “Clock API” and add an “alarm” object to it.

At the moment we don’t have any proper way (afaik) to set an alarm in
b2g/gaia… last time I checked we were using a setTimeout() for that.
I think it’d be nice to handle an array of alarms and attach callbacks
to each alarm.

:kazé


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabien Cazenave  
View profile  
 More options Mar 31 2012, 3:56 am
Newsgroups: mozilla.dev.webapi
From: Fabien Cazenave <fab...@cazenave.cc>
Date: Sat, 31 Mar 2012 09:56:54 +0200
Local: Sat, Mar 31 2012 3:56 am
Subject: Re: Time/Clock API
Le 31/03/2012 00:19, Mounir Lamouri a écrit :

> Hi,

> Following bug 714357 and bug 714358 discussions, I would like to propose
> an API for Time/Clock (we should keep one word I guess).

> There are six things we want to handle:
> 1. set time
> 2. get time
> 3. set timezone
> 4. get timezone
> 5. be informed when time is changed
> 6. be informed when timezone changes

My 2˘: let’s call it “Clock API” and add an “alarm” object to it.

At the moment we don’t have any proper way (afaik) to set an alarm in
b2g/gaia… last time I checked we were using a setTimeout() for that.
I think it’d be nice to handle an array of alarms and attach callbacks
to each alarm.

:kazé


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Bicking  
View profile  
 More options Mar 31 2012, 12:25 am
Newsgroups: mozilla.dev.webapi
From: Ian Bicking <i...@ianbicking.org>
Date: Fri, 30 Mar 2012 23:25:39 -0500
Local: Sat, Mar 31 2012 12:25 am
Subject: Re: Time/Clock API
On Mar 30, 2012 5:20 PM, "Mounir Lamouri" <mou...@lamouri.fr> wrote:

> 5. Time change
> We should fire a change event to navigator.time.
> That event should fire if the timezone has been changed or the time has
> been changed manually. It should not be fired every ms ;)

Would this fire if the time is changed due to ntp or done other sync event?
If so, would there also be a threshold?  E.g., if the adjustment is less
than a couple milliseconds would that count as no change?

  Ian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kaiser  
View profile  
 More options Apr 2 2012, 3:04 pm
Newsgroups: mozilla.dev.webapi
From: Robert Kaiser <ka...@kairo.at>
Date: Mon, 02 Apr 2012 21:04:11 +0200
Local: Mon, Apr 2 2012 3:04 pm
Subject: Re: Time/Clock API
Fabien Cazenave schrieb:

> My 2˘: let’s call it “Clock API” and add an “alarm” object to it.

+1

Reason: "Clock" as a word makes it easier to connect it with the system
clock (RTC) being managed through it, while "Time" is easily twisted
with the existing Date object. Also, there's usually ways for the
system's RTC to save and trigger alarms, so the "alarm" stuff fits onto
a "Clock" object very well.

Robert Kaiser


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JOSE MANUEL CANTERA FONSECA  
View profile  
 More options Apr 3 2012, 4:08 am
Newsgroups: mozilla.dev.webapi
From: JOSE MANUEL CANTERA FONSECA <j...@tid.es>
Date: Tue, 03 Apr 2012 10:08:12 +0200
Local: Tues, Apr 3 2012 4:08 am
Subject: Re: Time/Clock API

El 31/03/12 00:19, "Mounir Lamouri" <mou...@lamouri.fr> escribió:

>Hi,

>Following bug 714357 and bug 714358 discussions, I would like to propose
>an API for Time/Clock (we should keep one word I guess).

>There are six things we want to handle:
>1. set time
>2. get time
>3. set timezone
>4. get timezone

Probably timezone is part of a setting

>5. be informed when time is changed
>6. be informed when timezone changes

>1. Set time
>We can have a navigator.time.set() method that will either take a double
>that will be the number of milliseconds since epoch in the current
>timezone or a Date object. The system time will then be replaced.

Wouldn't it be good to have also nanosecond precision?

On the other hand according to the Ecmascript Spec the number of
milliseconds since the epoch are always independent of the timezone ...
See the getTime method of Date or Date.now()

>ISSUES:
>I can think of two questions: should we take the epoch double in UTC
>timezone (I guess not but better to ask) and how should we behave if the
>Date object isn't in the same timezone the system currently is?

I think it is not a good idea to use Date objects for setting time

>Could
>that actually happen unless the timezone has been changed in the
>meantime? If not, we could just throw/ignore. Otherwise, we should
>define a behavior.

>2. Get time
>Use Date.

>3/4. Set/Get Timezone
>We should use the Settings API to do that.

Yes

>5. Time change
>We should fire a change event to navigator.time.
>That event should fire if the timezone has been changed or the time has
>been changed manually. It should not be fired every ms ;)

If timezone changes this can be detected through the Settings API

A time change is worth informing if an alarm is set and the target time
has elapsed

>6. Timezone change
>The settings API should allow you to listen to changes.

Yes

I don't see setting the time by passing a Date object which to some extent
has some bindings to the timezone. So I would only use the double

>Thanks,
>--
>Mounir
>_______________________________________________
>dev-webapi mailing list
>dev-web...@lists.mozilla.org
>https://lists.mozilla.org/listinfo/dev-webapi

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at
http://www.tid.es/ES/PAGINAS/disclaimer.aspx

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andreas Gal  
View profile  
 More options Apr 3 2012, 4:12 am
Newsgroups: mozilla.dev.webapi
From: Andreas Gal <g...@mozilla.com>
Date: Tue, 3 Apr 2012 01:12:57 -0700
Local: Tues, Apr 3 2012 4:12 am
Subject: Re: Time/Clock API

>> There are six things we want to handle:
>> 1. set time
>> 2. get time
>> 3. set timezone
>> 4. get timezone

Shouldn't this be something we delegate to the UA? The radio layer usually supplies time and timezone information. If not the radio layer, the web does (NTP). If there is no radio and no web, we probably are ok with whatever time is on the device (the user has bigger problems at that point that setting the time).

> 5. be informed when time is changed
> 6. be informed when timezone changes

These seem useful.

Andreas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mounir Lamouri  
View profile  
 More options Apr 3 2012, 10:24 am
Newsgroups: mozilla.dev.webapi
From: Mounir Lamouri <mou...@lamouri.fr>
Date: Tue, 03 Apr 2012 16:24:43 +0200
Local: Tues, Apr 3 2012 10:24 am
Subject: Re: Time/Clock API
On 03/31/2012 06:25 AM, Ian Bicking wrote:

> Would this fire if the time is changed due to ntp or done other sync event?

Yes.

> If so, would there also be a threshold?  E.g., if the adjustment is less
> than a couple milliseconds would that count as no change?

I think that could be up to the implementation. It seems silly to send
an event for a few microseconds time change but specifying that might
hard because choosing an arbitrary value wouldn't be a good idea.

--
Mounir


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mounir Lamouri  
View profile  
 More options Apr 3 2012, 10:48 am
Newsgroups: mozilla.dev.webapi
From: Mounir Lamouri <mou...@lamouri.fr>
Date: Tue, 03 Apr 2012 16:48:21 +0200
Local: Tues, Apr 3 2012 10:48 am
Subject: Re: Time/Clock API
On 04/03/2012 10:08 AM, JOSE MANUEL CANTERA FONSECA wrote:

>> I can think of two questions: should we take the epoch double in UTC
>> timezone (I guess not but better to ask) and how should we behave if the
>> Date object isn't in the same timezone the system currently is?

> I think it is not a good idea to use Date objects for setting time

Wouldn't that be easier to manipulate dates with Date objects?

--
Mounir


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mounir Lamouri  
View profile  
 More options Apr 3 2012, 10:55 am
Newsgroups: mozilla.dev.webapi
From: Mounir Lamouri <mou...@lamouri.fr>
Date: Tue, 03 Apr 2012 16:55:48 +0200
Local: Tues, Apr 3 2012 10:55 am
Subject: Re: Time/Clock API
On 04/03/2012 10:12 AM, Andreas Gal wrote:

>>> There are six things we want to handle:
>>> 1. set time
>>> 2. get time
>>> 3. set timezone
>>> 4. get timezone

> Shouldn't this be something we delegate to the UA? The radio layer usually supplies time and timezone information.

Indeed but usually phones allow you to disable that. Personally, I've
always found that feature quite flaky especially while traveling and I
tend to disable it.

> If not the radio layer, the web does (NTP).

That I do not understand. If someone writes an NTP client for B2G,
he/she will need the WebSocket API and the Clock API, right?

> If there is no radio and no web, we probably are ok with whatever time is on the device (the user has bigger problems at that point that setting the time).

So, given that I'm not sure what you meant by "the web does (NTP)", I'm
really sure how to reply here but as I said, my phones have radio layer
time information disabled which means I'm setting the timezone manually
(and sometimes update the time but it tends to be rare).
In addition, even if I had an NTP server set up, I want to be able to
change my timezone (and time) information while I'm offline. Typically,
when I board a plan, I change the timezone to match the timezone
destination. How could I do that if I have to rely on radio layer or NTP
client?

Cheers,
--
Mounir


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mounir Lamouri  
View profile  
 More options Apr 3 2012, 11:02 am
Newsgroups: mozilla.dev.webapi
From: Mounir Lamouri <mou...@lamouri.fr>
Date: Tue, 03 Apr 2012 17:02:17 +0200
Local: Tues, Apr 3 2012 11:02 am
Subject: Re: Time/Clock API
On 03/31/2012 09:56 AM, Fabien Cazenave wrote:

> My 2˘: let’s call it “Clock API” and add an “alarm” object to it.

> At the moment we don’t have any proper way (afaik) to set an alarm in
> b2g/gaia… last time I checked we were using a setTimeout() for that.
> I think it’d be nice to handle an array of alarms and attach callbacks
> to each alarm.

An Alarm API is in the list of WebAPIs we will have to work on [1].
Maybe it could be merged with the Clock API. However, I would prefer to
wait and see what happens with the background apps topic before going
forward with an alarm api; maybe we could simply make the alarm clock
app staying alive in the background? Though, it might be nice to have an
API that gives a time and a callback so the callback is called at the
appropriate time. I'm just worried that the only use case would be an
Alarm Clock app. A Calendar app might use a similar API but the Alarm
Clock app likely doesn't care about timezones while the Calendar app
does... This is a different topic anyhow ;)

[1] https://wiki.mozilla.org/WebAPI#APIs

Cheers,
--
Mounir


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kaiser  
View profile  
 More options Apr 3 2012, 1:17 pm
Newsgroups: mozilla.dev.webapi
From: Robert Kaiser <ka...@kairo.at>
Date: Tue, 03 Apr 2012 19:17:47 +0200
Local: Tues, Apr 3 2012 1:17 pm
Subject: Re: Time/Clock API
Mounir Lamouri schrieb:

> However, I would prefer to
> wait and see what happens with the background apps topic before going
> forward with an alarm api; maybe we could simply make the alarm clock
> app staying alive in the background?

Actually, I expect that we'll need to support the case where you set an
alarm and turn off your phone (yes, some people conserve battery power
and avoid disturbances while they sleep and turn off this life-important
device). And for that, we probably need to set some kind of system RTC
alarm that wakes the whole OS at the specified time, as I doubt there
are any background apps running when the device is turned off.

Robert Kaiser


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin Lebar  
View profile  
 More options Apr 3 2012, 1:23 pm
Newsgroups: mozilla.dev.webapi
From: Justin Lebar <justin.le...@gmail.com>
Date: Tue, 3 Apr 2012 13:23:47 -0400
Local: Tues, Apr 3 2012 1:23 pm
Subject: Re: Time/Clock API

> Actually, I expect that we'll need to support the case where you set an
> alarm and turn off your phone (yes, some people conserve battery power and
> avoid disturbances while they sleep and turn off this life-important
> device).

Other people expect that turning off your phone entirely will silence
any alarms.  For example this guy [1].

I'm totally OK with our v1 phone not ringing alarms when it's powered off.

[1] http://www.nytimes.com/2012/01/13/nyregion/ringing-finally-stopped-bu...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Miller  
View profile  
 More options Apr 3 2012, 10:51 pm
Newsgroups: mozilla.dev.webapi
From: Jason Miller <ja...@developit.ca>
Date: Tue, 3 Apr 2012 22:51:12 -0400
Local: Tues, Apr 3 2012 10:51 pm
Subject: Re: Time/Clock API
I don't know anyone who turns off their phone expecting it to wake them in
the morning.  It's not a logical assumption to make, and unless someone
were to explicitly prove to the user that it could be done, there is a
trust issue.

This is also the main purpose of having separate volume controls for phone,
alarm and media.

@Justin, I was thinking of the same article.  Though it appears in that
particular instance the man had only set his ringer to vibrate, not
realizing the alarm has its own volume control.

Jason Miller
519.872.0797 // developIT <http://developit.ca/> // Jason Miller
Design<http://jasonmillerdesign.com/>
*Developer of amoebaOS <https://amoebaos.com/>,
Shutterborg<http://shutterb.org/> &
more

*


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin Lebar  
View profile  
 More options Apr 4 2012, 1:40 am
Newsgroups: mozilla.dev.webapi
From: Justin Lebar <justin.le...@gmail.com>
Date: Wed, 4 Apr 2012 01:40:57 -0400
Local: Wed, Apr 4 2012 1:40 am
Subject: Re: Time/Clock API

> @Justin, I was thinking of the same article.  Though it appears in that
> particular instance the man had only set his ringer to vibrate, not
> realizing the alarm has its own volume control.

His solution now is to power off his phone when he goes to concerts.
Imagine how he'd be thwarted by our alarm!  :)

As another example, imagine your phone alarm going off in an airplane
during takeoff or landing.  You did everything right, powering it off,
but it powered itself up.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gervase Markham  
View profile  
 More options Apr 4 2012, 5:37 am
Newsgroups: mozilla.dev.webapi
From: Gervase Markham <g...@mozilla.org>
Date: Wed, 04 Apr 2012 10:37:32 +0100
Local: Wed, Apr 4 2012 5:37 am
Subject: Re: Time/Clock API
On 03/04/12 15:55, Mounir Lamouri wrote:

> Indeed but usually phones allow you to disable that. Personally, I've
> always found that feature quite flaky especially while traveling and I
> tend to disable it.

Yes; O2 in the UK, at least, gets this wrong with Android.

Gerv


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mounir Lamouri  
View profile  
 More options Apr 4 2012, 10:43 am
Newsgroups: mozilla.dev.webapi
From: Mounir Lamouri <mou...@lamouri.fr>
Date: Wed, 04 Apr 2012 16:43:08 +0200
Local: Wed, Apr 4 2012 10:43 am
Subject: Re: Time/Clock API
On 04/03/2012 07:17 PM, Robert Kaiser wrote:

> Actually, I expect that we'll need to support the case where you set an
> alarm and turn off your phone (yes, some people conserve battery power
> and avoid disturbances while they sleep and turn off this life-important
> device). And for that, we probably need to set some kind of system RTC
> alarm that wakes the whole OS at the specified time, as I doubt there
> are any background apps running when the device is turned off.

That's a feature I actually used in the past when I was using
feature-phones from a well-known Finish company. However, I wonder if
that is still working with current smartphones. FWIW, it doesn't seem to
work with my Nexus S.

Practically, that's the kind of feature people will have a hard time to
find and will require some low level work (we have to be able to boot
the phone because of the alarm and boot in a special mode were only the
alarm shows up). However, we could keep that in mind for the API design
but I don't see us implementing such a feature for a v1.

Cheers,
--
Mounir


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andreas Gal  
View profile  
 More options Apr 4 2012, 10:46 am
Newsgroups: mozilla.dev.webapi
From: Andreas Gal <g...@mozilla.com>
Date: Wed, 4 Apr 2012 07:46:22 -0700
Local: Wed, Apr 4 2012 10:46 am
Subject: Re: Time/Clock API

On Apr 4, 2012, at 7:43 AM, Mounir Lamouri wrote:

> On 04/03/2012 07:17 PM, Robert Kaiser wrote:
>> Actually, I expect that we'll need to support the case where you set an
>> alarm and turn off your phone (yes, some people conserve battery power
>> and avoid disturbances while they sleep and turn off this life-important
>> device). And for that, we probably need to set some kind of system RTC
>> alarm that wakes the whole OS at the specified time, as I doubt there
>> are any background apps running when the device is turned off.

> That's a feature I actually used in the past when I was using
> feature-phones from a well-known Finish company. However, I wonder if
> that is still working with current smartphones. FWIW, it doesn't seem to
> work with my Nexus S.

Smart phones are usually constantly connected to the network to wait for push notifications. I don't think we will see RTC-driven hardware wakeup any time soon on the roadmap.

Andreas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kaiser  
View profile  
 More options Apr 4 2012, 12:20 pm
Newsgroups: mozilla.dev.webapi
From: Robert Kaiser <ka...@kairo.at>
Date: Wed, 04 Apr 2012 18:20:05 +0200
Local: Wed, Apr 4 2012 12:20 pm
Subject: Re: Time/Clock API
Justin Lebar schrieb:

> His solution now is to power off his phone when he goes to concerts.
> Imagine how he'd be thwarted by our alarm!  :)

> As another example, imagine your phone alarm going off in an airplane
> during takeoff or landing.  You did everything right, powering it off,
> but it powered itself up.

Those are both not issues, because you as a user won't set an alarm to
go off at a time where you know you won't want to get an alarm.

Anyhow, I know a lot of people who are used to this behavior, including
myself when traveling (esp. when I'm e.g. in the US I want to turn off
the phone when sleeping because I don't want to get *any* disturbance
from Europeans thinking they call me during daytime when it's night,
etc. - but of course, I want to be woken by an alarm in the morning.

In any case, I just wanted to give the example of what an alarm on the
Clock API would be useful for, I didn't mean to say it has to be
implemented immediately. ;-)

Robert Kaiser


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »