ResponderConfig.Builder
  public
  static
  final
  
  class
  ResponderConfig.Builder
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.net.wifi.rtt.ResponderConfig.Builder | 
Builder class used to construct ResponderConfig objects.
Summary
| Public constructors | |
|---|---|
| 
      Builder()
      Default constructor for the Builder. | |
| Public methods | |
|---|---|
| 
        
        
        
        
        
        ResponderConfig | 
      build()
      Build  | 
| 
        
        
        
        
        
        ResponderConfig.Builder | 
      set80211azNtbSupported(boolean supports80211azNtb)
      Sets an indication the access point can to respond to the IEEE 802.11az non-trigger based ranging protocol, but, if false, indicates only IEEE 802.11mc or one-sided Wi-Fi RTT is possible. | 
| 
        
        
        
        
        
        ResponderConfig.Builder | 
      set80211mcSupported(boolean supports80211mc)
      Sets an indication the access point can to respond to the two-sided Wi-Fi RTT protocol, but, if false, indicates only one-sided Wi-Fi RTT is possible. | 
| 
        
        
        
        
        
        ResponderConfig.Builder | 
      setCenterFreq0Mhz(int centerFreq0)
      Sets the center frequency in MHz of the first segment of the channel. | 
| 
        
        
        
        
        
        ResponderConfig.Builder | 
      setCenterFreq1Mhz(int centerFreq1)
      Sets the center frequency in MHz of the second segment of the channel, if used. | 
| 
        
        
        
        
        
        ResponderConfig.Builder | 
      setChannelWidth(int channelWidth)
      Sets the channel bandwidth in MHz. | 
| 
        
        
        
        
        
        ResponderConfig.Builder | 
      setFrequencyMhz(int frequency)
      Sets the frequency of the channel in MHz. | 
| 
        
        
        
        
        
        ResponderConfig.Builder | 
      setMacAddress(MacAddress macAddress)
      Sets the Responder MAC Address. | 
| 
        
        
        
        
        
        ResponderConfig.Builder | 
      setPreamble(int preamble)
      Sets the preamble encoding for the protocol. | 
| 
        
        
        
        
        
        ResponderConfig.Builder | 
      setResponderType(int responderType)
      Sets the responder type, can be  | 
| 
        
        
        
        
        
        ResponderConfig.Builder | 
      setSecureRangingConfig(SecureRangingConfig secureRangingConfig)
      Set secure ranging configuration. | 
| Inherited methods | |
|---|---|
Public constructors
Public methods
build
public ResponderConfig build ()
Build ResponderConfig given the current configurations made on the builder.
| Returns | |
|---|---|
| ResponderConfig | an instance of ResponderConfigThis value cannot benull. | 
set80211azNtbSupported
public ResponderConfig.Builder set80211azNtbSupported (boolean supports80211azNtb)
Sets an indication the access point can to respond to the IEEE 802.11az non-trigger based ranging protocol, but, if false, indicates only IEEE 802.11mc or one-sided Wi-Fi RTT is possible.
| Parameters | |
|---|---|
| supports80211azNtb | boolean: the ability to support the IEEE 802.11az non-trigger based
                           ranging protocol | 
| Returns | |
|---|---|
| ResponderConfig.Builder | the builder to facilitate chaining builder.setXXX(..).setXXX(..).
 This value cannot benull. | 
set80211mcSupported
public ResponderConfig.Builder set80211mcSupported (boolean supports80211mc)
Sets an indication the access point can to respond to the two-sided Wi-Fi RTT protocol, but, if false, indicates only one-sided Wi-Fi RTT is possible.
| Parameters | |
|---|---|
| supports80211mc | boolean: the ability to support the Wi-Fi RTT protocol | 
| Returns | |
|---|---|
| ResponderConfig.Builder | the builder to facilitate chaining builder.setXXX(..).setXXX(..).
 This value cannot benull. | 
setCenterFreq0Mhz
public ResponderConfig.Builder setCenterFreq0Mhz (int centerFreq0)
Sets the center frequency in MHz of the first segment of the channel.
Note: The frequency is used as a hint, and the underlying WiFi subsystem may use it, or select an alternate if its own connectivity scans have determined the frequency of the access point has changed.
| Parameters | |
|---|---|
| centerFreq0 | int: the center frequency in MHz of first channel segment
 Value is 0 or greater | 
| Returns | |
|---|---|
| ResponderConfig.Builder | the builder to facilitate chaining builder.setXXX(..).setXXX(..).
 This value cannot benull. | 
setCenterFreq1Mhz
public ResponderConfig.Builder setCenterFreq1Mhz (int centerFreq1)
Sets the center frequency in MHz of the second segment of the channel, if used.
Note: The frequency is used as a hint, and the underlying WiFi subsystem may use it, or select an alternate if its own connectivity scans have determined the frequency of the access point has changed.
| Parameters | |
|---|---|
| centerFreq1 | int: the center frequency in MHz of second channel segment
 Value is 0 or greater | 
| Returns | |
|---|---|
| ResponderConfig.Builder | the builder to facilitate chaining builder.setXXX(..).setXXX(..).
 This value cannot benull. | 
setChannelWidth
public ResponderConfig.Builder setChannelWidth (int channelWidth)
Sets the channel bandwidth in MHz.
| Parameters | |
|---|---|
| channelWidth | int: the bandwidth of the channel in MHz
 Value isScanResult.CHANNEL_WIDTH_20MHZ,ScanResult.CHANNEL_WIDTH_40MHZ,ScanResult.CHANNEL_WIDTH_80MHZ,ScanResult.CHANNEL_WIDTH_160MHZ,ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ, orScanResult.CHANNEL_WIDTH_320MHZ | 
| Returns | |
|---|---|
| ResponderConfig.Builder | the builder to facilitate chaining builder.setXXX(..).setXXX(..).
 This value cannot benull. | 
setFrequencyMhz
public ResponderConfig.Builder setFrequencyMhz (int frequency)
Sets the frequency of the channel in MHz.
Note: The frequency is used as a hint, and the underlying WiFi subsystem may use it, or select an alternate if its own connectivity scans have determined the frequency of the access point has changed.
| Parameters | |
|---|---|
| frequency | int: the frequency of the channel in MHz
 Value is 0 or greater | 
| Returns | |
|---|---|
| ResponderConfig.Builder | the builder to facilitate chaining builder.setXXX(..).setXXX(..).
 This value cannot benull. | 
setMacAddress
public ResponderConfig.Builder setMacAddress (MacAddress macAddress)
Sets the Responder MAC Address.
 A responder must be identified by either a MacAddress
 or a PeerHandle (for Aware peers, set via
 ERROR(/#setPeerHandle(android.net.wifi.aware.PeerHandle))), but not both.
 
 Note: This method sets the MAC address. If a PeerHandle was previously
 set using ERROR(/#setPeerHandle(android.net.wifi.aware.PeerHandle)), both identifiers might be temporarily
 present within the builder. The final validation ensuring that only one of
 these identifiers is exclusively set occurs during the build() operation.
 If build() is called when both a MAC address and a PeerHandle are configured
 or when neither is set, it will result in an IllegalArgumentException.
| Parameters | |
|---|---|
| macAddress | MacAddress: the physical address of the responder
 This value may benull. | 
| Returns | |
|---|---|
| ResponderConfig.Builder | the builder to facilitate chaining builder.setXXX(..).setXXX(..).
 This value cannot benull. | 
setPreamble
public ResponderConfig.Builder setPreamble (int preamble)
Sets the preamble encoding for the protocol.
| Parameters | |
|---|---|
| preamble | int: the preamble encoding
 Value isScanResult.PREAMBLE_LEGACY,ScanResult.PREAMBLE_HT,ScanResult.PREAMBLE_VHT,ScanResult.PREAMBLE_HE, orScanResult.PREAMBLE_EHT | 
| Returns | |
|---|---|
| ResponderConfig.Builder | the builder to facilitate chaining builder.setXXX(..).setXXX(..).
 This value cannot benull. | 
setResponderType
public ResponderConfig.Builder setResponderType (int responderType)
Sets the responder type, can be ResponderConfig.RESPONDER_AP or ResponderConfig.RESPONDER_STA or
 ERROR(/#RESPONDER_AWARE)
| Parameters | |
|---|---|
| responderType | int: the type of the responder, if not set defaults toResponderConfig.RESPONDER_APValue isResponderConfig.RESPONDER_AP,ResponderConfig.RESPONDER_STA, android.net.wifi.rtt.ResponderConfig.RESPONDER_P2P_GO, android.net.wifi.rtt.ResponderConfig.RESPONDER_P2P_CLIENT, or android.net.wifi.rtt.ResponderConfig.RESPONDER_AWARE | 
| Returns | |
|---|---|
| ResponderConfig.Builder | the builder to facilitate chaining builder.setXXX(..).setXXX(..).
 This value cannot benull. | 
setSecureRangingConfig
public ResponderConfig.Builder setSecureRangingConfig (SecureRangingConfig secureRangingConfig)
Set secure ranging configuration. See SecureRangingConfig for more details.
 
 Note: Secure ranging will get enabled only if the device and responder support. For
 device support see WifiRttManager.getRttCharacteristics(). Following capabilities
 needs to be enabled,
 
- WifiRttManager.CHARACTERISTICS_KEY_BOOLEAN_NTB_INITIATOR
- WifiRttManager.CHARACTERISTICS_KEY_BOOLEAN_SECURE_HE_LTF_SUPPORTEDand/or
- WifiRttManager.CHARACTERISTICS_KEY_BOOLEAN_RANGING_FRAME_PROTECTION_SUPPORTED
-  ScanResult.capabilitiesstring contains PASN and optionally a base AKM
-  ScanResult.isSecureHeLtfSupported()
-  ScanResult.isRangingFrameProtectionRequired()
| Parameters | |
|---|---|
| secureRangingConfig | SecureRangingConfig: Secure ranging configuration
 This value cannot benull. | 
| Returns | |
|---|---|
| ResponderConfig.Builder | the builder to facilitate chaining builder.setXXX(..).setXXX(..).
 This value cannot benull. | 
