0

如何监控切换android 3g和2g。WiFi 我已经这样做了

WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
int i =wifi.getWifiState();
String s; 
        switch (i)
        {
            case 1:
                s="disabled";
                break;
            case 3:
                s="enabled";
                break;
            default:
                s="";
                break;
        }
4

0 回答 0