In this Global Client Support (GCS) video created by Elisha Tanikonda @tanie_GCS , you will learn about an API that you can run on the developer toolbar console to verify the network status when troubleshooting offline-enabled mobile applications.
In this scenario you have offline and online functionality in your mobile application; however, online functionality can only be executed when the mobile device is connected to the server.
When your application is not connected to the server, you can display an appropriate error message to the user.
The issue arises when the users do not see the expected error message on their mobile screens.
To resolve this, connect your device and open your browser’s Developer console, and then execute the following command:
window.pega.offline.NetworkStatus.isDataNetworkAvailable()
The API returns true when your device is connected to the server.
You can use this API in your application logic and accordingly display the message to the user. You can also use the API to debug when needed.
Refer to the following documents to learn more about offline-enabled mobile applications.
Troubleshoot offline-enabled applications in a browser
Working with offline-enabled mobile apps
[Video]: Support Guide: Tracing Offline Mobile Applications
To see our complete collection of videos, refer to this Support Video search link, which picks up all new Support Videos as they are posted. Also, please reply below if you have topic suggestions!