I am developing a wearable app where I want to launch the App from the widget. I used the appControl to launch the app when the widget is clicked, but this method works only if the App ist not yet started. if the app is sent to the background (with the homekey for example). the widget cant run it or bring it to the foreground. if I kill the app instance manually from the app manager, I can call it again from the widget. can someone tell me if there is any Parameter in the config.xml or the launchAppControl method to allow the widget to show already running app. Thanks
var viewAllS2 = document.getElementById("s02_all_btn");
viewAllS2.addEventListener("click", viewAllReminders, true);
function viewAllReminders(){
var app = window.tizen.application.getCurrentApplication();
var appId = app.appInfo.id.substring(0, (app.appInfo.id.lastIndexOf(".")) );
var appControl = new window.tizen.ApplicationControl("http://tizen.org/appcontrol/operation/viewallrem", null, null, null, null);
window.tizen.application.launchAppControl(appControl, appId,
function() {
console.log("launch application control succeed");
},
function(e) {
console.log("launch application control failed. reason: " + e.message);
},
null);
}
Aucun commentaire:
Enregistrer un commentaire