Reputation: 895
I have a big problem with running worklight application without enabled wifi or mobile data connections. The application starts and then quit, i need to get to the home screen and then implement some logic.
wlCommonInit is never called in that case. I debugged application and saw that something is sending message "onMessage(exit,null)" and then calls onDestroy()
Steps to reproduce: - Turn off wifi and mobile data and start the application
Used environments:
- Worklight 6.2
- Android
Upvotes: 0
Views: 160
Reputation: 44516
In Worklight 6.2.0.01 I've created a new Hybrid application with the Android environment.
This application performs the below. The application was installed in an Android Nexus 5 device running Android OS 5. The device was set to Airplane mode (no WiFi, no 3G). Upon launching the application the onFailure
function was invoked, as expected. No crash.
Provide your implementation so that it could be debugged.
function wlCommonInit(){
WL.Client.connect({onSuccess: success, onFailure: failure});
}
function success() {
alert ("success");
}
function failure() {
alert ("failure");
}
Upvotes: 1