how do you folks check if the device is connected to the internet in a sencha touch app?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s an attribute called
navigator.onLine(general browser support, not specific for Sencha)If I’m in a PhoneGap application (which you often are if you’re using Sencha Touch), I’d rather use their network.isReachable function, since I’ve by experience found it more reliable.
There’s also something called ‘Offline events’, John Resig describes them on his blog: http://ejohn.org/blog/offline-events/.