On Thursday, April 10, 2014 4:52:55 PM UTC-7, Prateek Jadhwani wrote:
> Hi there,
> 
> I am trying to use the example given in 
> 
> https://developer.mozilla.org/en-US/docs/Web/API/MozAlarmsManager.getAll 
> 
> for one of my bugs, and it seems that it returns a different id everytime I 
> try to get alarm.id  and returns the current time in alarm.date.toString().

Could you paste example code of what your script is doing. If you are using the 
result of add(), it will be a new ID every time.
> 
> Also, this link https://wiki.mozilla.org/WebAPI/AlarmAPI says "No, the 
> getAll(...) only returns the alarms scheduled by the application. "  If it 
> only returns the alarms added by the app itself, then what would be the 
> correct procedure to get the Alarm from the clock app. Will I have to use 
> alarmdb.js to retrieve them?

Apps are bound by the same-origin policy, just like normal web pages. Which 
means you cannot access anything the clock app is doing from another app. If 
you really need to get the list of alarms added by the clock app, you'll have 
to add Inter-App Communication API support to the clock, get it landed in Gaia 
(with a requisite justification of strong enough use cases for this feature) 
and then have your app talk to clock over IAC.

Regards,
Nikhil
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to