on 07-26-2021 10:44 AM
I have created an offline app in MDK. I have added a button to sync to the backend. I wanted to know if there is any way to detect, if the device is connected to a network so that it automatically sync. instead of clicking on the sync button.
Thank You
You can use the Connectivity module from NativeScript that we have also exposed via ClientAPI.nativescript.connectivityModule.
you can use connectivityModule.startMonitoring and connectivityModule.stopMonitoring functions that will allow you to monitor when the app is connected to certain connection, and then you can trigger the upload/download.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.