android socket connection -
i have created client-server wi-fi app. problem when server connection lost, not throws io exception during read/write operation in socket. how can identify server connection lost within app?
thanks in advance.
you can use this
private boolean checkinternetconnection() { connectivitymanager conmgr = (connectivitymanager) getsystemservice (context.connectivity_service); return conmgr.getactivenetworkinfo().isconnectedorconnecting(); }
i hope you.
Comments
Post a Comment