Check if app is online


I’ve been trying to check if my ionic app is online. I’ve written a codepen here, with a working example. The problem is that if try to replicate this on my Nexus 5, it doesn’t work but keeps telling that the device is online even when I put it on fly mode. While if I emulate the app on ios with wi-if off it actually works.

Does anyone have an idea why?

Plus, any suggestion how to constantly check in background if the device is online in order to model some data fetching I’m performing?


Problem solved, it was just a matter of using cordova:

Thanks in any case.

Hey glad to hear you resolved it!

The docs you were referencing are a bit older. The api shouldn’t have changed, but it’s always nice to know where to get the most up to date info. :smile:

Thanks for the newer ref :smile: