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

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -