Added in API level 26

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
onFailed(reason: Int)

LocalOnlyHotspot failed to start.

open Unit

LocalOnlyHotspot start succeeded.

open Unit

LocalOnlyHotspot stopped.

Constants

ERROR_GENERIC

Added in API level 26
static val ERROR_GENERIC: Int
Value: 2

ERROR_INCOMPATIBLE_MODE

Added in API level 26
static val ERROR_INCOMPATIBLE_MODE: Int
Value: 3

ERROR_NO_CHANNEL

Added in API level 26
static val ERROR_NO_CHANNEL: Int
Value: 1

ERROR_TETHERING_DISALLOWED

Added in API level 26
static val ERROR_TETHERING_DISALLOWED: Int
Value: 4

Public constructors

LocalOnlyHotspotCallback

Added in API level 26
LocalOnlyHotspotCallback()

Public methods

onFailed

Added in API level 26
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

Added in API level 26
open fun onStarted(reservation: WifiManager.LocalOnlyHotspotReservation!): Unit

LocalOnlyHotspot start succeeded.

onStopped

Added in API level 26
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().