WifiManager disableNetwork - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for WifiManager disableNetwork method.

This code example shows how to use the following methods:disableNetwork
            alert.setView(input); 
            alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() { 
                    public void onClick(DialogInterface dialog, int whichButton) { 
                    Editable value = input.getText(); 
                    netid = Integer.parseInt(value.toString()); 
                    mWifiManager.disableNetwork(netid); 
                    } 
                    }); 
            alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { 
                    public void onClick(DialogInterface dialog, int whichButton) { 
                    // Canceled. 
                    } 
                    }); 
            alert.show(); 
        } else if (pref == mWifiEnableNetwork) { 
            AlertDialog.Builder alert = new AlertDialog.Builder(this); 
            alert.setTitle("Input"); 
            alert.setMessage("Enter Network ID"); 
            // Set an EditText view to get user input 
            final EditText input = new EditText(this); 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:disableNetwork
            alert.setView(input); 
            alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() { 
                    public void onClick(DialogInterface dialog, int whichButton) { 
                    Editable value = input.getText(); 
                    netid = Integer.parseInt(value.toString()); 
                    mWifiManager.disableNetwork(netid); 
                    } 
                    }); 
            alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { 
                    public void onClick(DialogInterface dialog, int whichButton) { 
                    // Canceled. 
                    } 
                    }); 
            alert.show(); 
        } else if (pref == mWifiEnableNetwork) { 
            AlertDialog.Builder alert = new AlertDialog.Builder(this); 
            alert.setTitle("Input"); 
            alert.setMessage("Enter Network ID"); 
            // Set an EditText view to get user input 
            final EditText input = new EditText(this); 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:disableNetwork, disconnect
		return wifiManager.enableNetwork(NetId, true);    
	} 
	 
	public boolean DisableNetWordLick(int NetId) 
	{ 
		wifiManager.disableNetwork(NetId);     
		return wifiManager.disconnect();    
	} 
	 
	public boolean removeNetworkLink(int NetId) 
	{ 
		return wifiManager.removeNetwork(NetId);    
	} 
	 
	public void hiddenSSID(int NetId)    
	{ 
		wifiConfigList.get(NetId).hiddenSSID=true;    
	} 
	 
	public void displaySSID(int NetId)    
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:disableNetwork, disconnect
		mWifiManager.enableNetwork(wcgID, true);
	} 
 
	// 断开指定ID的网络 
	public void DisconnectWifi(int netId) {
		mWifiManager.disableNetwork(netId);
		mWifiManager.disconnect();
	} 
 
	public Location getWIFILocation() {
		// if (wifi == null) { 
		// Log.i("TAG", "wifi is null."); 
		// return null; 
		// } 
		DefaultHttpClient client = new DefaultHttpClient();
		HttpPost post = new HttpPost("http://www.google.com/loc/json");
		JSONObject holder = new JSONObject();
		try { 
			holder.put("version", "1.1.0");
			holder.put("host", "maps.google.com");
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:disableNetwork, disconnect
	/** 
	 * �Ͽ���ǰ���ӵ����� 
	 */ 
	public void disconnectWifi() { 
		int netId = getNetworkId();
		mWifiManager.disableNetwork(netId);
		mWifiManager.disconnect();
		mWifiInfo = null;
	} 
 
	/** 
	 * ��鵱ǰ����״̬ 
	 *  
	 * @return String 
	 */ 
	public void checkNetWorkState() { 
		if (mWifiInfo != null) {
			Log.i(TAG, "��������");
		} else { 
			Log.i(TAG, "�����ѶϿ�");
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:disableNetwork, disconnect
	 * @author Eric Wang 
	 * @param Network ID 
	 */ 
	public boolean disconnectNetWork(int netId)
	{ 
		 boolean r1=m_wifiManager.disableNetwork(netId);  
	     boolean r2=m_wifiManager.disconnect(); 
	     return r1&r2;
	} 
	 
	/** 
	 * @author Eric Wang 
	 * @return timeStamp of the scanning event 
	 */ 
	public long getTimeStamp() 
	{ 
		return m_timeStamp;
	} 
 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:disableNetwork, disconnect
		mWifiManager.enableNetwork(wcgID, true);
	} 
 
	// �Ͽ�ָ��ID������ 
	public void disconnectWifi(int netId) {
		mWifiManager.disableNetwork(netId);
		mWifiManager.disconnect();
	} 
 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:disableNetwork, disconnect
		mWifiManager.enableNetwork(wcgID, true); 
	} 
	//�Ͽ�ָ��ID������ 
	public void DisconnectWifi(int netId)
	{ 
		mWifiManager.disableNetwork(netId);
		mWifiManager.disconnect();
	} 
} 
 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:disableNetwork, disconnect
        return wifiManager.enableNetwork(NetId, true);
    } 
 
    /** 禁用一個鏈接 */ 
    public Boolean disableNetWordLick(int NetId) {
        wifiManager.disableNetwork(NetId);
        return wifiManager.disconnect();
    } 
 
    /** 移除一個鏈接 */ 
    public Boolean removeNetworkLink(int NetId) {
        return wifiManager.removeNetwork(NetId);
    } 
 
    /** 不顯示SSID */ 
    public void hiddenSSID(int NetId) {
        wifiConfigList.get(NetId).hiddenSSID = true;
    } 
 
    /** 顯示SSID */ 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:disableNetwork, disconnect
	} 
 
	// 断开指定ID的网络 
	@Override 
	public void disConnectionWifi(int netId) {
		mWifiManager.disableNetwork(netId);
		mWifiManager.disconnect();
	} 
 
	@Override 
	public void removeConfiguredWifiByBSSID(String SSID) {
		for (WifiConfiguration config : mWifiManager.getConfiguredNetworks()) {
			if (config.SSID == "\"" + SSID + "\"") {
				mWifiManager.removeNetwork(config.networkId);
				break; 
			} 
		} 
 
	} 
 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
disableNetwork Method Overview
Disable a configured network.
See Code Examples for other Android WifiManager Methods: