Hi.
I have two applications: native service app written in C, that runs in background and web-based watch face app. I want to start my service app from the watch face app. This is my code:
var appId = "com.companyname.appname";
tizen.application.launch(appId, function() {
console.log("app opened");
}, function(e) {
console.log("error " + e.type + " msg:" + e.message);
});
This code is not working and the error says "error undefined msg:Unknown error has occurred".
But if I change the appId to "com.samsung.weather" then its working fine. It opens the weather app. So i guess I'm giving a wrong appId. But I've checked with this code:
tizen.application
.getAppsInfo(function onListInstalledApps(applications) {
console.log("APPS INSTALLED:");
for (var i = 0; i < applications.length; i++)
console.log(i + " ID: " + applications[i].id);
});
and it displays exactly the same ID that I was using above (the id of my native service app).
I've also tried with command tool sdb to list installed apps and it gave me the same ID....
Why it's not working?