2

I am using webservice call in my application. Using broadcast receiver checking the internet connection (android.net.ConnectivityManager.CONNECTIVITY_ACTION) and request the webservice call.

The android.net.ConnectivityManager.CONNECTIVITY_ACTION will only work if some network/wifi changes in the device which the application is running.

Can any one tell me how the device can come to know if there is any problem in router (may be router disconnected) or hotspot problem from the device. Is there is any API available to overcome this problem?

we were created the stubs using WSClient++ in the application. When the webservice call is going on in that time if router disconnects then in the device the application webservice call is keep on processing the request. It's not disconnected or throw an exception.

mindus
  • 171
  • 2
  • 10
  • I think you can use sockets for that. Make a socket connection with your webservice that will always be connected. Then you can detect a socket close using this http://stackoverflow.com/questions/151590/how-to-detect-a-remote-side-socket-close – Pedro Oliveira Sep 24 '14 at 13:30

0 Answers0