BarcodeScanner icon indicating copy to clipboard operation
BarcodeScanner copied to clipboard

Barcode scanner cancel trigger offline

Open hdriqi opened this issue 9 years ago • 1 comments

I dont know what happen, but there's case in my apps when I use back button to cancel barcode scanner, suddenly navigator.onLine is false. But, when I do ajax request then navigator.onLine is back to true. The thing is, my apps is going to be offline first apps, so that when it is navigated back to the page the first thing it check is that is navigator.onLine is true or false.

hdriqi avatar Feb 08 '16 04:02 hdriqi

I think it would be better to simply check the connection status with Cordova: https://github.com/apache/cordova-plugin-network-information

You should probably also listen to events and change your app status when the phone is going online.

Eccenux avatar Feb 13 '16 14:02 Eccenux