For android device how to check wifi status when there is web authentication needed for open wifi connection -


i have application makes check of network connectivity before making server request. used connectivity manger check network state. when connecting wifi open network needs authentication credential entered browser. if have not enter wifi credential, connectivity manager returns me true, showing internet connected. not allow me browse. can tell me how handle case.

public static boolean getwifienabled(context context) {         boolean result = false;         connectivitymanager connectivitymanager = (connectivitymanager) context                 .getsystemservice(context.connectivity_service);         android.net.networkinfo activenetwork = connectivitymanager                 .getactivenetworkinfo();         if (activenetwork != null                 && (activenetwork.gettype() == connectivitymanager.type_wifi)) {             if (activenetwork.getstate() == networkinfo.state.connected) {                 result = true;                 activenetwork.getdetailedstate();             } else {             }         } else {         }         return result;     } 


Comments

Popular posts from this blog

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

wordpress - (T_ENDFOREACH) php error -

Using django-mptt to get only the categories that have items -