Code example for WpsInfo

1
    } 
 
    public WifiP2pConfig getConfig() {
        WifiP2pConfig config = new WifiP2pConfig();
        config.deviceAddress = mDeviceAddress.getText().toString();
        config.wps = new WpsInfo();
        switch (mWpsSetupIndex) {
            case WPS_PBC:
                config.wps.setup = WpsInfo.PBC;
                break; 
            case WPS_KEYPAD:
                config.wps.setup = WpsInfo.KEYPAD;
                /*config.wps.pin = ((TextView) mView.findViewById(R.id.wps_pin)). 
                        getText().toString();*/ 
                break; 
            case WPS_DISPLAY:
                config.wps.setup = WpsInfo.DISPLAY;
                break; 
            default: 
                config.wps.setup = WpsInfo.PBC;