LocalOnlyHotspotReservation
open class LocalOnlyHotspotReservation : AutoCloseable
kotlin.Any | |
↳ | android.net.wifi.WifiManager.LocalOnlyHotspotReservation |
LocalOnlyHotspotReservation that contains the SoftApConfiguration
for the active LocalOnlyHotspot request.
Applications requesting LocalOnlyHotspot for sharing will receive an instance of the LocalOnlyHotspotReservation in the LocalOnlyHotspotCallback#onStarted(LocalOnlyHotspotReservation)
call. This reservation contains the relevant SoftApConfiguration
. When an application is done with the LocalOnlyHotspot, they should call android.net.wifi.WifiManager.LocalOnlyHotspotReservation#close()
. Once this happens, the application will not receive any further callbacks. If the LocalOnlyHotspot is stopped due to a user triggered mode change, applications will be notified via the android.net.wifi.WifiManager.LocalOnlyHotspotCallback#onStopped()
callback.
Summary
Public methods | |
---|---|
open Unit |
close() |
open SoftApConfiguration |
Returns the |
open WifiConfiguration? |
Returns the |
Protected methods | |
---|---|
open Unit |
finalize() |
Public methods
close
open fun close(): Unit
Exceptions | |
---|---|
java.lang.Exception |
if this resource cannot be closed |
getSoftApConfiguration
open fun getSoftApConfiguration(): SoftApConfiguration
Returns the SoftApConfiguration
of the current Local Only Hotspot (LOHS).
Return | |
---|---|
SoftApConfiguration |
This value cannot be null . |
getWifiConfiguration
open fungetWifiConfiguration(): WifiConfiguration?
Deprecated: Use WifiManager#getSoftApConfiguration()
to get the LOHS configuration.
Returns the WifiConfiguration
of the current Local Only Hotspot (LOHS). May be null if hotspot enabled and security type is not WifiConfiguration.KeyMgmt.None
or WifiConfiguration.KeyMgmt.WPA2_PSK
.
Protected methods
finalize
protected open fun finalize(): Unit
Exceptions | |
---|---|
java.lang.Throwable |
the Exception raised by this method |