在没有互联网连接的情况下无法 运行 worklight 应用程序
Unable to run worklight application without internet connection
在未启用 wifi 或移动数据连接的情况下,运行 worklight 应用程序存在很大问题。应用程序启动然后退出,我需要进入主屏幕然后执行一些逻辑。
wlCommonInit 在这种情况下永远不会被调用。我调试了应用程序,看到有东西正在发送消息 "onMessage(exit,null)" 然后调用 onDestroy()
重现步骤:
- 关闭wifi和移动数据并启动应用程序
使用的环境:
- 工作灯 6.2
- Android
在 Worklight 6.2.0.01 中,我使用 Android 环境创建了一个新的混合应用程序。
此应用程序执行以下操作。该应用程序安装在 Android Nexus 5 设备 运行 Android OS 5. 设备设置为飞行模式(无 WiFi,无 3G)。启动应用程序后,onFailure
函数被调用,正如预期的那样。没有崩溃。
提供您的实现以便对其进行调试。
function wlCommonInit(){
WL.Client.connect({onSuccess: success, onFailure: failure});
}
function success() {
alert ("success");
}
function failure() {
alert ("failure");
}
在未启用 wifi 或移动数据连接的情况下,运行 worklight 应用程序存在很大问题。应用程序启动然后退出,我需要进入主屏幕然后执行一些逻辑。
wlCommonInit 在这种情况下永远不会被调用。我调试了应用程序,看到有东西正在发送消息 "onMessage(exit,null)" 然后调用 onDestroy()
重现步骤: - 关闭wifi和移动数据并启动应用程序
使用的环境:
- 工作灯 6.2
- Android
在 Worklight 6.2.0.01 中,我使用 Android 环境创建了一个新的混合应用程序。
此应用程序执行以下操作。该应用程序安装在 Android Nexus 5 设备 运行 Android OS 5. 设备设置为飞行模式(无 WiFi,无 3G)。启动应用程序后,onFailure
函数被调用,正如预期的那样。没有崩溃。
提供您的实现以便对其进行调试。
function wlCommonInit(){
WL.Client.connect({onSuccess: success, onFailure: failure});
}
function success() {
alert ("success");
}
function failure() {
alert ("failure");
}