I have created a tizen wearable app to collect some sensor data continuously. And to make sure that it runs continuously, i restart the app every 5 min using a recurring alarm. In the app code, i have a check that if the app is launched by alarm, i move the app to background using
tizen.application.getCurrentApplication().hide()
I also have a setting in the config.xml to allow the app to run in background:
<tizen:setting background-support="enable" encryption="disable" hwkey-event="enable"/>
So, this allowed my app to run in background without displaying on the watch screen. This was working in tizen version 2.3. But when i updated the tizen to 3.0, the app doesn't hide after launching by alarm.
Then, i found that in the latest tizen version, i also have to add another setting in config.xml for this to work.
https://developer.tizen.org/ko/development/tizen-studio/web-tools/configuring-your-app/configuration-editor?langredirect=1#ww_bg_category
So, i have added the below additional setting in the config.xml
<tizen:background-category value="sensor"/>
Even, after adding this the "tizen.application.getCurrentApplication().hide()" is still not working. So, now every 5 min when the app is launched by alarm, it opens and hides for a second and then relaunches on the screen. How can i fix this issue?