Hello
I have a problem while using the Alarm API and Application Control. I set a recurring alarm which periodically activates my app:
var appId = tizen.application.getCurrentApplication().appInfo.id;
var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/default", "myUri");
var newAlarm = new tizen.AlarmRelative(60, 600); //after 60 seconds, every 10 minutes
tizen.alarm.add(newAlarm, appId, appControl);
This in general works OK, my app is activated periodically. However, for some reason, every time my app is activated, the screen of the watch is turned on.
In other words, my app needs to do some work every 10 minutes, without user interaction, so it doesn't need to be visible, but the operating system activates the screen anyway. It causes bad user experience, because the user just sees the screen flash randomly now and then. It doesn't help if I turn off the screen programatically ( tizen.power.turnScreenOff() ), because it is too late, the screen is already active for at least 1 second, showing the watchface.
I have tried using different app control operations: default, main, view, even custom ones, but it doesn't help.
To make things more interesting, this only happens on Tizen 3 (Gear S3 watch). On the Gear S2, the screen is not activated.
Could someone shed some light on this issue? Is it normal? Is it a feature that when launching the app by using Alarm API and Application Control, the screen will always be turned on?
If yes, how can I periodically launch my app in the background, without activating the screen?
Thank you