I have the following code and paste it in Console and then turn screen off (no 
CPU locks active) and plug out the USB.

navigator.mozSetMessageHandler('alarm', function gotAlarm(message) {
  console.log(new Date(), 'alarm setmessagehandler', message.data);
  nextAlarm();
});
function nextAlarm() {
  var next = new Date(Date.now() + 3000);
  navigator.mozAlarms.add(next, 'ignoreTimezone', { data: 'yolo' });
}
nextAlarm();

After a while I turn the screen back on. When I run this in Clock app 
everything is fine. I see a log message for every 3 seconds in the log.

When I do the same in the system app it stops logging anything when the screen 
is off and USB is plugged out.

Is mozAlarms behavior different in System than in content apps or do I miss a 
permission?
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to