Skip to content

Most visited

Recently visited

navigation

WifiManager.LocalOnlyHotspotCallback

public static class WifiManager.LocalOnlyHotspotCallback
extends Object

java.lang.Object
   ↳ android.net.wifi.WifiManager.LocalOnlyHotspotCallback


Callback class for applications to receive updates about the LocalOnlyHotspot status.

Summary

Constants

int ERROR_GENERIC

int ERROR_INCOMPATIBLE_MODE

int ERROR_NO_CHANNEL

int ERROR_TETHERING_DISALLOWED

Public constructors

WifiManager.LocalOnlyHotspotCallback()

Public methods

void onFailed(int reason)

LocalOnlyHotspot failed to start.

void onStarted(WifiManager.LocalOnlyHotspotReservation reservation)

LocalOnlyHotspot start succeeded.

void onStopped()

LocalOnlyHotspot stopped.

Inherited methods

From class java.lang.Object

Constants

ERROR_GENERIC

added in API level 26
int ERROR_GENERIC

Constant Value: 2 (0x00000002)

ERROR_INCOMPATIBLE_MODE

added in API level 26
int ERROR_INCOMPATIBLE_MODE

Constant Value: 3 (0x00000003)

ERROR_NO_CHANNEL

added in API level 26
int ERROR_NO_CHANNEL

Constant Value: 1 (0x00000001)

ERROR_TETHERING_DISALLOWED

added in API level 26
int ERROR_TETHERING_DISALLOWED

Constant Value: 4 (0x00000004)

Public constructors

WifiManager.LocalOnlyHotspotCallback

added in API level 26
WifiManager.LocalOnlyHotspotCallback ()

Public methods

onFailed

added in API level 26
void onFailed (int reason)

LocalOnlyHotspot failed to start.

Applications can attempt to call 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
void onStarted (WifiManager.LocalOnlyHotspotReservation reservation)

LocalOnlyHotspot start succeeded.

Parameters
reservation WifiManager.LocalOnlyHotspotReservation

onStopped

added in API level 26
void onStopped ()

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 close().

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)