Package android.net.wifi

Examples of android.net.wifi.WifiManager


     * @return Can connect to internet or not
     */
    @SuppressWarnings( "static-access" )
    public boolean canConnect( Context context, SharedPreferences prefs ) {
        // get wifi manager
        WifiManager wifi = (WifiManager) context.getSystemService( Context.WIFI_SERVICE );

        // if wifi is disabled and the user preference only allows wifi abort
        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 );
View Full Code Here

TOP

Related Classes of android.net.wifi.WifiManager

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.