Hi All
Is there any signal which i can use to know if Network cable is unplugged?
Hi All
Is there any signal which i can use to know if Network cable is unplugged?
Not to my knowledge, there isn't. You would have to setup a simple test class instead that periodically ping some internet site and test for a successful hit.
Since your app doesn't know where the traffic is going to go the result would be meaningless anyway. You could have the network cable disconnected but internet access via a bluetooth connection to a 3G phone or dongle.
So the easiest way to detect is to just try: If you can't connect to the server, report an error. User will notice if the cable isn't plugged in when they investigate.
Bookmarks