Package android.net

Examples of android.net.ConnectivityManager


        if( wifi.getWifiState() != wifi.WIFI_STATE_ENABLED && prefs.getString( "connection", "" ).equals( CON_WIFI ) ) {
            return false;
        }

        // get connectivity manager
        ConnectivityManager manager = (ConnectivityManager) context.getSystemService( Context.CONNECTIVITY_SERVICE );

        // check if we have active network and that network is connected, if not abort
        if( manager.getActiveNetworkInfo() == null || !manager.getActiveNetworkInfo().isConnected() ) {
            return false;
        }

        // we can use the internet connection
        return true;
View Full Code Here

TOP

Related Classes of android.net.ConnectivityManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.