Can we get the app version and IP address info using worklight api?

泄露秘密 提交于 2019-12-02 10:10:41

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").

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!