Can anyone please tell me which SDK pac开发者_开发技巧kages are used for switching on or off 3g and wifi on Android devices.
I can't help with 3G (I know the procedure is different between CDMA and GSM networks) but for Wifi, look into the WifiManager
class for handling that sort of thing. For example, you could use this to toggle Wifi on and off:
WifiManager wifi = (WifiManager)getSystemService(Context.WIFI_SERVICE);
wifi.setWifiEnabled(!wifi.isWifiEnabled());
EDIT: The package is android.net.wifi
精彩评论