Back to project page androidcomplete.
The source code is released under:
MIT License
If you think the Android project androidcomplete listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.core.connmanager; /*from w ww .j a v a2 s .c om*/ import android.net.ConnectivityManager; import android.net.NetworkInfo; public class NetworkManager { ConnectivityManager connMan; NetworkInfo networkInfo; public NetworkManager(){ networkInfo = connMan.getActiveNetworkInfo(); } public void networkStatus(){ if(!networkInfo.isConnected()){ //TODO: }else if(networkInfo != null){ //TODO: More information to show networkInfo.getTypeName(); }else{ //TODO: Error networkInfo.getReason(); } } }