Page 1 of 1

Trap the "data connection lost" event

Posted: Tue Jun 26, 2012 9:01 pm
by Claudio

Hi,
how can I trap the "data connection lost" (3G or WiFi does not matter) event?
I saw your documentation and seem to me that I can use the "offline" event, but it does not seem to work.

Thanks for answering


Trap the "data connection lost" event

Posted: Tue Jun 26, 2012 9:12 pm
by maxkatz

The 'offline' event is PhoneGap event: http://docs.phonegap.com/en/1.8.1/cor...

You could check what error is returned by the service (if any) in case there is no connection and handle it.


Trap the "data connection lost" event

Posted: Tue Jun 26, 2012 9:34 pm
by Claudio

mmm... I would like to disable buttons at all if there isn't connection.
Is this possible?


Trap the "data connection lost" event

Posted: Tue Jun 26, 2012 9:46 pm
by maxkatz

Of course it's possible, you just need to write the logic to implement that.