Code example for WifiInfo

Methods: getNetworkId

0
			mContext = context;
			if (ConnectivityManager.CONNECTIVITY_ACTION.equals(intent.getAction())) {
				WifiManager wifiManager = (WifiManager) context
						.getSystemService(Context.WIFI_SERVICE);
				WifiInfo info = wifiManager.getConnectionInfo();
				if (!wifiManager.isWifiEnabled() || -1 == info.getNetworkId()) {
					CUR_NETSTATE = NetState.Mobile;
				} 
			} 
		} 
 
	} 
	/** 
	 * 获取 当前apn并返回httphost对象 
	 * @return  
	 */ 
	public static HttpHost getAPN() {
		HttpHost proxy = null;
		Uri uri = Uri.parse("content://telephony/carriers/preferapn");
		Cursor mCursor = null;
		if (null != mContext) {