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 IWifiInterface

interface IWifiInterface
Extends com.amazon.apmf.IStandard The IWifiInterface interface provides the API to manage Wi-Fi network interface. This lets a Kepler Native application scan nearby Wi-Fi access points, manage Wi-Fi access point profiles, setup Wi-Fi connections and monitor Wi-Fi connection events.

Methods

addWifiEventListener()

void addWifiEventListener(IWifiEventListener* listener)
Register a listener for receiving Wi-Fi scan and connection events. See IWifiEventListener.

Parameters

listener
IWifiEventListener* — Required Listener for receiving Wi-Fi scan and connection events.

removeWifiEventListener()

void removeWifiEventListener()
Unregister the listener for receiving Wi-Fi scan and connection events.

addProfileEventListener()

void addProfileEventListener(IProfileEventListener* listener)
Register a listener for receiving Wi-Fi Profile change. See IProfileEventListener.

Parameters

listener
IProfileEventListener* — Required Listener for receiving Wi-Fi profile event.

removeProfileEventListener()

void removeProfileEventListener()
Unregister the listener for receiving Wi-Fi Profile change.

startScan()

void startScan()
Request a Wi-Fi scan asynchronously. Upon completion of Wi-Fi scan, onScanDone() in the registered IWifiEventListener is triggered. Requires com.amazon.wifi.privilege.wifi-scan

getScanResults()

com.amazon.kepler.net.wifi.common.IScanResultItem*[] getScanResults()
Get the results of the latest Wi-Fi scan.

Returns

com.amazon.kepler.net.wifi.common.IScanResultItem*[] the array of access points discovered from the most recent scan. Requires com.amazon.wifi.privilege.wifi-scan

getProfiles()

com.amazon.kepler.net.wifi.common.IProfile*[] getProfiles()
Get Wi-Fi Profiles in the system.

Returns

com.amazon.kepler.net.wifi.common.IProfile*[] the array of IProfile. Credential information in each Profile is hidden. With the additional permission, the credential is displayed. Requires com.amazon.wifi.privilege.net-info Requires com.amazon.wifi.privilege.read-wifi-credential for credential information.

createProfile()

com.amazon.kepler.net.wifi.common.IProfile* createProfile()
Create a new Wi-Fi Profile.

Returns

com.amazon.kepler.net.wifi.common.IProfile* IProfile new Profile.

createIIpConfiguration()

com.amazon.kepler.net.common.IIpConfiguration* createIIpConfiguration()
Create a new IIpConfiguration to configure the network interface.

Returns

com.amazon.kepler.net.common.IIpConfiguration* IIpConfiguration.

addProfile()

void addProfile(com.amazon.kepler.net.wifi.common.IProfile* profile)
Add a new Wi-Fi Profile.

Parameters

profile
com.amazon.kepler.net.wifi.common.IProfile* — Required new Profile to be added. Requires com.amazon.network.privilege.net-admin

removeProfile()

void removeProfile(string ssid, com.amazon.kepler.net.wifi.common.AuthMode* authMode)
Remove a Wi-Fi Profile.

Parameters

ssid
string — Required the SSID of the profile to be removed.
authMode
com.amazon.kepler.net.wifi.common.AuthMode* — Required the authentication mode of the Profile to be removed. authMode can be set to AuthMode.UNKNOWN to match the access point without authentication mode. Requires com.amazon.network.privilege.net-admin

saveProfiles()

void saveProfiles()
Save Wi-Fi Profiles in the system. Requires com.amazon.network.privilege.net-admin

enableProfiles()

void enableProfiles(bool enable)
Enable or disable all Wi-Fi Profiles.

Parameters

enable
bool — Required if true, enable all Wi-Fi Profiles. If false, disable all Wi-Fi Profiles. Requires com.amazon.network.privilege.net-admin

connect()

void connect(string ssid, com.amazon.kepler.net.wifi.common.AuthMode* authMode)
Connect to the access point stored in Wi-Fi Profiles.

Parameters

ssid
string — Required SSID of the access point to connect.
authMode
com.amazon.kepler.net.wifi.common.AuthMode* — Required authentication mode of the access point to connect. authMode can be set to AuthMode.UNKNOWN to match the access point with any authentication mode. Requires com.amazon.network.privilege.net-admin

disconnect()

void disconnect()
Disconnect the connected access point. Requires com.amazon.network.privilege.net-admin

getConnectionInfo()

com.amazon.kepler.net.wifi.common.IConnectionInfo? getConnectionInfo()
Get the current connection information.

Returns

com.amazon.kepler.net.wifi.common.IConnectionInfo? The return value is optional and might be absent. the current connection information. If privilege is not granted, SSID will be masked as <unknown ssid>, BSSID will be masked to 02:00:00:00:00:00 Requires com.amazon.wifi.privilege.net-info

calculateSignalLevel()

i8 calculateSignalLevel(i8 rssi, i8 levels)
Get the level of the signal strength.

Parameters

rssi
i8 — Required Received Signal Strength Indicator (RSSI) in dBm.
levels
i8 — Required the number of levels to calculate.

Returns

i8 a level of signal.

getStandard()

com.amazon.kepler.net.wifi.common.Standard getStandard()
Get the supported Wi-Fi Standard.

Returns

com.amazon.kepler.net.wifi.common.Standard Standard.

getStatisticsInfo()

com.amazon.kepler.net.wifi.common.IStatisticsInfo? getStatisticsInfo()
Get the statistic information.

Returns

com.amazon.kepler.net.wifi.common.IStatisticsInfo? The return value is optional and might be absent. IStatisticsInfo.
Last modified on October 29, 2026