In my worklight
hybrid app, I want to get two info:
app version
(the version the end-user sees in the various App Stores or in the device)IP address
How can I do it?
In my worklight
hybrid app, I want to get two info:
app version
(the version the end-user sees in the various App Stores or in the device)IP address
How can I do it?
IP address: The Worklight Hybrid application does not have any IP address. The client (the app...) connects to the Worklight Server. The IP address you set the client to connect to is set in application-descriptor.xml as the value of worklightServerRootURL
.
If you mean that you're actually looking for the device IP address, you can get this using WL.Device.getNetworkInfo.
App version: Like with the IP address, the "version" of the Worklight application is set as well in application-descriptor.xml as an attribute of the environment element.
<android version="1.0">
...
...
...
</android>
You can retrieve it by using WL.Client.getAppProperty("APP_VERSION").