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

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -