TetheringManager.TetheringRequest.Builder


public static class TetheringManager.TetheringRequest.Builder
extends Object

java.lang.Object
   ↳ android.net.TetheringManager.TetheringRequest.Builder


Builder used to create TetheringRequest.

Summary

Public constructors

Builder(int type)

Default constructor of Builder.

Public methods

TetheringManager.TetheringRequest build()

Build TetheringRequest with the currently set configuration.

TetheringManager.TetheringRequest.Builder setSoftApConfiguration(SoftApConfiguration softApConfig)

Set the desired SoftApConfiguration for TetheringManager.TETHERING_WIFI.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

public Builder (int type)

Default constructor of Builder.

Parameters
type int: Value is TetheringManager.TETHERING_WIFI, android.net.TetheringManager.TETHERING_USB, android.net.TetheringManager.TETHERING_BLUETOOTH, android.net.TetheringManager.TETHERING_WIFI_P2P, android.net.TetheringManager.TETHERING_NCM, android.net.TetheringManager.TETHERING_ETHERNET, or android.net.TetheringManager.TETHERING_VIRTUAL

Public methods

build

public TetheringManager.TetheringRequest build ()

Build TetheringRequest with the currently set configuration.

Returns
TetheringManager.TetheringRequest This value cannot be null.

setSoftApConfiguration

public TetheringManager.TetheringRequest.Builder setSoftApConfiguration (SoftApConfiguration softApConfig)

Set the desired SoftApConfiguration for TetheringManager.TETHERING_WIFI. If this is null or not set, then the persistent tethering SoftApConfiguration from ERROR(WifiManager.getSoftApConfiguration()/android.net.wifi.WifiManager#getSoftApConfiguration() WifiManager.getSoftApConfiguration()) will be used.

If TETHERING_WIFI is already enabled and a new request is made with a different SoftApConfiguration, the request will be accepted if the device can support an additional tethering Wi-Fi AP interface. Otherwise, the request will be rejected.

Non-system callers using TETHERING_WIFI must specify a SoftApConfiguration.
Requires ERROR(/android.Manifest.permission#TETHER_PRIVILEGED)

Parameters
softApConfig SoftApConfiguration: SoftApConfiguration to use. This value may be null.

Throws
IllegalArgumentException if the tethering type isn't TETHERING_WIFI.