LocalOnlyHotspotCallback
open class LocalOnlyHotspotCallback
kotlin.Any | |
↳ | android.net.wifi.WifiManager.LocalOnlyHotspotCallback |
Callback class for applications to receive updates about the LocalOnlyHotspot status.
Summary
Constants | |
---|---|
static Int | |
static Int | |
static Int | |
static Int |
Public constructors | |
---|---|
Public methods | |
---|---|
open Unit |
LocalOnlyHotspot failed to start. |
open Unit |
onStarted(reservation: WifiManager.LocalOnlyHotspotReservation!) LocalOnlyHotspot start succeeded. |
open Unit |
LocalOnlyHotspot stopped. |
Constants
ERROR_TETHERING_DISALLOWED
static val ERROR_TETHERING_DISALLOWED: Int
Value: 4
Public constructors
Public methods
onFailed
open fun onFailed(reason: Int): Unit
LocalOnlyHotspot failed to start.
Applications can attempt to call WifiManager#startLocalOnlyHotspot(LocalOnlyHotspotCallback, Handler)
again at a later time.
Parameters | |
---|---|
reason |
Int: The reason for failure could be one of: ERROR_TETHERING_DISALLOWED , ERROR_INCOMPATIBLE_MODE , ERROR_NO_CHANNEL , or ERROR_GENERIC . |
onStarted
open fun onStarted(reservation: WifiManager.LocalOnlyHotspotReservation!): Unit
LocalOnlyHotspot start succeeded.
onStopped
open fun onStopped(): Unit
LocalOnlyHotspot stopped.
The LocalOnlyHotspot can be disabled at any time by the user. When this happens, applications will be notified that it was stopped. This will not be invoked when an application calls LocalOnlyHotspotReservation#close()
.