Added in API level 36
Builder
class Builder
| kotlin.Any | |
| ↳ | android.net.TetheringManager.TetheringRequest.Builder |
Builder used to create TetheringRequest.
Summary
| Public constructors | |
|---|---|
|
Default constructor of Builder. |
|
| Public methods | |
|---|---|
| open TetheringManager.TetheringRequest |
build()Build |
| open TetheringManager.TetheringRequest.Builder |
setSoftApConfiguration(softApConfig: SoftApConfiguration?)Set the desired SoftApConfiguration for |
Public constructors
Builder
Added in API level 36
Builder(type: Int)
Default constructor of Builder.
| Parameters | |
|---|---|
type |
Int: Value is android.net.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
Added in API level 36
open fun build(): TetheringManager.TetheringRequest
Build TetheringRequest with the currently set configuration.
| Return | |
|---|---|
TetheringManager.TetheringRequest |
This value cannot be null. |
setSoftApConfiguration
Added in API level 36
open fun setSoftApConfiguration(softApConfig: SoftApConfiguration?): TetheringManager.TetheringRequest.Builder
Set the desired SoftApConfiguration for TETHERING_WIFI. If this is null or not set, then the persistent tethering SoftApConfiguration from android.net.wifi.WifiManager#getSoftApConfiguration() will be used.
Requires android.Manifest.permission#TETHER_PRIVILEGED
| Parameters | |
|---|---|
softApConfig |
SoftApConfiguration?: SoftApConfiguration to use. This value may be null. |
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException |
if the tethering type isn't TETHERING_WIFI. |