1

I am a newbie in sencha and using sencha touch 2.0 to develop an app that is compatible with IOS. In have a functionality like when using the app in phone, when no connectivity I need to display an alert. I tried with window.navigator.onLine. But it worked in browser not in Iphone. Kindly let me know is there any other way to implement this using sencha's library? Even navigator.network.isReachable("http://www.google.com", reachableCallback, {}); is not working.

Can you please help??

Titouan de Bailleul
  • 12,920
  • 11
  • 66
  • 121
vinod
  • 8,350
  • 9
  • 32
  • 36

2 Answers2

0

You can probably use

Ext.device.Connection.isOnline()

More info here http://docs.sencha.com/touch/2-0/#!/api/Ext.device.Connection

SajithNair
  • 3,867
  • 1
  • 17
  • 23
0

In Sencha touch 2.2 I tried Ext.device.Connection.isOnline(), but its always return true either in offline/online. So i tried this one

navigator.onLine 

its working for me in my ipad

Dibish
  • 9,133
  • 22
  • 64
  • 106