Languages

Menu
Sites
Language
Alarm is not triggered (or triggered but late) when the screen is off in gear S3

Hi, I am currently creating an app with Alarm API. I don't know what is going on but the alarm is not triggered correctly. It will be triggered when I turn on the screen (by clicking the button/wrist up my watch). Sometimes it works correctly but most of the time it doesn't. There is also a condition when it is triggered but late e.g. it should be triggered at 18.50, but it is triggered at 18.53! It seems it doesn't wake up the watch. And the weird thing is, it doesn't happen in the emulator.

I suspect there might be a problem with my watch, but i have tried the shipped alarm app and it worked OK.

Could you please help me what i should do to make sure that the alarm is triggered, it wakes up the watch, and launch the app? I can't find any docs :(

Any helps are very appreciated. Thank you very much :)

Edited by: Praditio Aditya Nugraha on 02 Apr, 2017

Responses

3 Replies
Armaan-Ul- Islam

I would say First thing you need to check is : Is system raising alarm response at 18:53 or it's 18:53 in real time but system is considering that 18:50 ?

 

AlarmAbsolute

 

var alarm1 = new tizen.AlarmAbsolute(new Date(2017, 3, 4, 19, 29));
var appId = "com.samsung.w-music-player";
tizen.alarm.add(alarm1, appId);

textbox.addEventListener("click", function(){
      
    	var currDate = new Date();
    	console.log("Alarm time: " + alarm1.date+ " Current time:" + currDate);
    		
    });

 

In the code above, each time I touch the textbox it gives me the comparison of my device's system time and alarm time. (the purpose is just to debug- track time)

 

Console output:

Alarm time: Tue Apr 04 2017 19:29:00 GMT+0600 (XXX) Current time:Tue Apr 04 2017 19:27:56 GMT+0600 (XXX)
Alarm time: Tue Apr 04 2017 19:29:00 GMT+0600 (XXX) Current time:Tue Apr 04 2017 19:28:47 GMT+0600 (XXX)

 

AlarmRelative

 

And  if you are using AlarmRelative use you can try getRemainingSeconds() to track system time.

 

var appId = "com.samsung.w-music-player";
var alarm2 = new tizen.AlarmRelative(1 * tizen.alarm.PERIOD_HOUR);
tizen.alarm.add(alarm2, appId);

textbox.addEventListener("click", function(){

    var sec = alarm2.getRemainingSeconds();
    console.log("remaining time is " + sec);

    });

 

Praditio Aditya Nugraha

Hi,

So I have set an alarm to be triggered at 18.50. Then i put my watch on the table and waiting until 18.50.. When it is already 18.50, i don't see my watch triggers the alarm, it doesn't do anything.. And I keep waiting... then finally my watch's display is turned on, it triggers the alarm! but.... it is late because it is already 18.53.

There are also times where the alarm is triggered after i wake up the watch. Similar with this issue: https://developer.tizen.org/ko/forums/web-application-development/trigger-alarm-when-gear-s-screen-off?langswitch=ko. Please look at the video: http://youtu.be/_TCraAms7CY

Armaan-Ul- Islam

"Triggering Alarm at 3-4 minitue delay" & "Triggering Alarm only when display is turned on" are two different cases. Please share which one is happening to you ?