Hello,

I wanted to create a trivial timer application for Firefox OS. The idea
is simple, you set the time, let's say 3 minutes, press "start", and
forget about your phone. After 3 minutes, it will ring to remind you
about something.

The timer should work even if application is closed and device is
suspended, should make some sound when timer expires and it shouldn't
stop making sound until user presses "OK". I was able to achieve this
with Alarm API, <audio> tag, window.open (which requires "attention"
permission) and screen WakeLock. 

Problem is, in order to use "attencion" permision my app has to be
"certified". If I understand this correctly, this makes it impossible
to be included in marketplace, right? It also uses WakeLock API, which
is not well documented.

I know I could use Notifications, they will turn screen on, and privida
a "bell", but I think it's not enough for timer application. It should
ring for at least 30 seconds, so it can't be missed. It should also be
possible to easly turn this ring off without unlocking the screen.

So my question is - what are the alternatives? This should be simple
application but somehow I don't know how to do this the right way. Any
help would be appreciated. 

The proof-of-concept application can be found on my github: 
http://github.com/kadamski/fxos_apps/tree/master/alarm1
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to