I'm working with Tizen SDK 2.2 and trying to set an AlarmRelative in my Web App with the following code:
var alarm = new window.tizen.AlarmRelative(window.tizen.alarm.PERIOD_MINUTE);
window.tizen.alarm.add(alarm, window.tizen.application.getCurrentApplication().appInfo.id);
In my config.xml I've added the following privileges and features:
<tizen:privilege name="http://tizen.org/privilege/alarm"/>
<tizen:privilege name="http://tizen.org/privilege/tizen"/>
<feature name="http://tizen.org/api/tizen" required="true"/>
<feature name="http://tizen.org/api/alarm" required="true"/>
<feature name="http://tizen.org/api/alarm.read" required="true"/>
<feature name="http://tizen.org/api/alarm.write" required="true"/>
As soon as I try doing something with window.tizen, the Emulator will give me the following exception:
Exception: TypeError: 'undefined' is not an object
When I run the exact same on the Simulator it does work, and it actually sets the alarm. I've made sure everything is running 2.2. Also tried an AlarmAbsolute and something simple like logging the timeformat with:
console.log("Time format: " + window.tizen.time.getTimeFormat());
But both gave me the same results. I've been searching for a while now, but can't find anyone with a solution so I figured I'd try here. Is my Emulator just broken, did I forget to do something, or is it something else?
Solved the problem, not sure why though, but I had to switch to a different workspace to get it to work.