El 23/05/14 15:31, "Pipo Koenig" <porschekoe...@googlemail.com> escribió:
>I cannot see how the mozAlarms approach could work. >When I add the alarm from within the app that gets eventually killed, >then the message handler for the alarm gets killed as well and will never >be called, right? When you are adding an alarm (imagine at 12:00am), even if you close the app (or it gets closed), it's gonna be re-open due to the system message. If you want to take a look how it works, you can check the 'Clock' app. You need only to specify in the manifest the permission ("alarms":{}), and add the .html which is going to be loaded when the system message from the alarm that you added is received [1]. Within your code you could add a handler (if you need it) as in [2] for handling this scenario. I hope it helps! [1] https://github.com/mozilla-b2g/gaia/blob/master/apps/clock/manifest.webapp# L43 [2] https://github.com/mozilla-b2g/gaia/blob/master/apps/clock/js/panels/alarm/ active_alarm.js#L24 >Am Donnerstag, 22. Mai 2014 20:16:52 UTC+2 schrieb Kevin Grandon: >> Could you potentially use mozAlarms to wake your app up in case it gets >>closed? This is what we do for calendar to synchronize events with the >>server. >> >> >> >> https://developer.mozilla.org/en/docs/WebAPI/Alarm >> >> >> >> Best, >> >> Kevin >> >> >_______________________________________________ >dev-b2g mailing list >dev-b2g@lists.mozilla.org >https://lists.mozilla.org/listinfo/dev-b2g This electronic message contains information from Telefonica UK or Telefonica Europe which may be privileged or confidential. The information is intended to be for the use of the individual(s) or entity named above. If you are not the intended recipient be aware that any disclosure, copying distribution or use of the contents of this information is prohibited. If you have received this electronic message in error, please notify us by telephone or email. Switchboard: +44 (0)113 272 2000 Email: feedb...@o2.com Telefonica UK Limited 260 Bath Road, Slough, Berkshire SL1 4DX Registered in England and Wales: 1743099. VAT number: GB 778 6037 85 Telefonica Europe plc 260 Bath Road, Slough, Berkshire SL1 4DX Registered in England and Wales: 05310128. VAT number: GB 778 6037 85 Telefonica Digital Limited 260 Bath Road, Slough, Berkshire SL1 4DX Registered in England and Wales: 7884976. VAT number: GB 778 6037 85 _______________________________________________ dev-b2g mailing list dev-b2g@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-b2g