How can i relaunch tizen web application programmatically ?
You should familiar with an application control api here: https://docs.tizen.org/application/web/guides/app-management/app-controls
In this case you can use implicit launch because you know requested app id.
This code belowe doese the job:
function launchApp(appId) {
try {
tizen.application.launch(appId, onsuccessCB, onerrorCb);
} catch(e) {
console.info(“app control exception " + e.message);
}
function onsuccessCB() {
console.info(” >>> Application with id " + appId + " launched successfully <<<");
}
function onerrorCb(e) {
// handle error
}
}
Don’t forget to add a privilege to config.xml file: <tizen:privilege name=“http://tizen.org/privilege/application.launch”/>
If you want to launch your app you have to use Alarm API here: https://developer.tizen.org/development/api-references/web-application?redirect=https://developer.tizen.org/dev-guide/5.5.0/org.tizen.web.apireference/html/device_api/mobile/tizen/alarm.html
Example:
var delaySeconds = 1;
var appId = tizen.application.getCurrentApplication().appInfo.id; // your app id
var alarm = new tizen.AlarmRelative( delaySeconds );
tizen.alarm.add(alarm, appId);
tizen.application.getCurrentApplication().exit();
Thank you so much @andrzej_bugajny
I hope it helps you.