-2

Just I want to detect the exact & sharp time of Internet/Network disconnected or connection no longer available.. Suppose my app is connected to some server after some time I lost my connection with server(say @ 02:30:15 PM) quickly at the same time I wana detect that time(02:30:15 PM) or I get alert that for this particular movement I lost my Connectivity..

Even if I have Wi-Fi or data connectivity is available I lost my connection..?

1 Answers1

2

See this link,it give a example of Brodacast Receiver for Connect/Disconnct event of wifi connection.

Implement Same BroadcastReceiver in your project and listen for connect and disconnect event, and at same time get system time by System.currentTimeMillis() method. Then you have the connect and disconnect time.

Hope this will be helpfull for you.

Community
  • 1
  • 1
Ravi Bhandari
  • 4,682
  • 8
  • 40
  • 68
  • Ya this is useful but still I don't want event on WI-FI connect-disconnect rather I want to detect time of connectivity lost even if I connected to WI-FI i.e. detection depend upon weak or poor WI-FI signals – Shekhar Mangrule Mar 17 '15 at 09:06
  • when connection is lost for either one second then receiver will call and you have time of connectivity lost. – Ravi Bhandari Mar 17 '15 at 09:08