Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IHostapInterface

interface IHostapInterface
Extends com.amazon.apmf.IStandard The IHostapInterface interface provides API to manage the network interface for Hostap (an Wi-Fi access point). Using the API, a Kepler Native application can create a secured network (WPA2 or WPA3) that Wi-Fi stations can join. APIs related to network layers above such as DHCP or Bridge are not provided in IHostapInterface. An application can create the new Hostap configuration with createHostapInfo(). See IHostapInfo to setup the specific Hostap configuration. After IHostapInfo is configured, Hostap can start with start(). When an application needs to fetch the current Hostap configuration, it can request the information with getHostapInfo(). The IHostapInfo from getHostapInfo() may have different parameters if the parameters are not specified when start() is called with. An application can stop the Hostap with stop(). Hostap API requires com.amazon.wifi.privilege.hostap in application’s manifest.

Methods

start()

void start(IHostapInfo* info)
Start Hostap to create an access point using the given configuration. The caller can make IHostapInfo object with createHostapInfo(). The creation of the Hostap may take some time. The caller can be notified of the Hostap state event if it register an listener with addEventListener(). This API throws an exception if Hostap is already running.

Parameters

info
IHostapInfo* — Required IHostapInfo which stores the configuration to create Hostap. Requires com.amazon.wifi.privilege.hostap

stop()

void stop()
Stop Hostap and remove the access point. The creation of the Hostap may take some time. The caller can be notified of the Hostap state event if it register an listener with addEventListener(). Requires com.amazon.wifi.privilege.hostap

getHostapInfo()

IHostapInfo? getHostapInfo()
Get the current configuration of Hostap. Regardless of whether the caller sets wildcard channel and bandwidth information to configure Hostap with start(), they will receive specific information.

Returns

IHostapInfo? The return value is optional and might be absent. IHostapInfo which stores the configuration of Hostap running. Requires com.amazon.wifi.privilege.hostap

getHostapState()

HostapState getHostapState()
Get the current state of Hostap.

Returns

HostapState HostapState which indicates the state. Requires com.amazon.wifi.privilege.hostap

addEventListener()

void addEventListener(IHostapEventListener* listener)
Register IHostapEventListener. The caller must implement a IHostapEventListener to receive notifications.

Parameters

listener
IHostapEventListener* — Required IHostapEventListener. Requires com.amazon.wifi.privilege.hostap

removeEventListener()

void removeEventListener()
Remove IHostapEventListener.

createHostapInfo()

IHostapInfo? createHostapInfo()
Make IHostapInfo object to set the configuration of Hostap.

Returns

IHostapInfo? The return value is optional and might be absent. IHostapInfo.
Last modified on October 29, 2026