Home » IBM » C5050-408 » When will the application developer be notified of the loss of connectivity if the heartbeat is not enabled?
An application developer needs to detect when the mobile device has lost network connectivity. To do so, the developer has added a listener for event
WL.Events.WORKLIGHT_IS_DISCONNECTED.
When will the application developer be notified of the loss of connectivity if the heartbeat is not enabled?
A. After the event "resume" has been fired.
B. When WL.Client.connect is called and it fails to connect to the Worklight Server.
C. When WL.Client.getEnvironment is called and the device does not have network connectivity.
D. When WL.Device.getNetworkInfo is called and the device does not have network connectivity.
Correct Answer: D
Explanation/Reference:
WL.Device.getNetworkInfo() – This method is available for the Android and iOS environments.
A callback must be specified as a function parameter. The callback receives an object with the following properties:
isNetworkConnected – true/false
isAirplaneMode – true/false carrierName – string. For example, AT&T or VERIZON. telephonyNetworkType – string. For example, UMTS or GPRS. isRoaming – true/false networkConnectionType – mobile/WiFi ipAddress – string
References:
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/data/working-offline/
Download Printable PDF. VALID exam to help you PASS.
|
|