Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Barcode scanner cancel trigger offline #322

Open
hdriqi opened this issue Feb 8, 2016 · 1 comment
Open

Barcode scanner cancel trigger offline #322

hdriqi opened this issue Feb 8, 2016 · 1 comment

Comments

@hdriqi
Copy link

hdriqi commented Feb 8, 2016

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.

@Eccenux
Copy link
Contributor

Eccenux commented Feb 13, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants