Languages

Menu
Sites
Language
Get App Id programatically

I've developed a web app that launches itself when data is received from SASocket.  I've had to hardcode in the app id - is there any way to get this at runtime from the config.xml?

For example instead of tizen.application.launch("blahblah.myAppName", ....), just tizen.application.launch(someVarContainingMyAppName, ....).

Responses

2 Replies
Alex Dem

Hi,
If you develop for Tizen mobile devices try to use these api with the ID is set to null or not set at all:
https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.device.apireference/tizen/application.html#getAppContextidp184736

https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.device.apireference/tizen/application.html#getAppInfoidp200496
You will able to extract appID after.
Alexey.

Sergey Zhdanov

Hi,

you can use getCurrentApplication() from Application API

var app = tizen.application.getCurrentApplication();
tizen.application.launch(app.appInfo.id, ..);