public class WlanCtrl
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BUNDLE_ENABLED |
static java.lang.String |
BUNDLE_ERROR_CODE |
static java.lang.String |
BUNDLE_ERROR_MSG |
static int |
RESULT_CODE_ERROR |
static int |
RESULT_CODE_SUCCESS |
| Constructor and Description |
|---|
WlanCtrl(android.content.Context context)
Instantiates a new Wlan ctrl.
|
| Modifier and Type | Method and Description |
|---|---|
android.os.Bundle |
connectProfile(java.lang.String ssid)
Connect profile bundle.
|
android.os.Bundle |
deleteProfile(java.lang.String ssid)
Delete profile bundle.
|
android.os.Bundle |
getConnectedProfile()
Get connected profile.
|
android.os.Bundle |
getIpAssignmentProfile(java.lang.String ssid)
ToDo: getIpAssignmentProfile no ready
|
android.os.Bundle |
getProxyProfile(java.lang.String ssid)
ToDo: only run in PA760, A9 and A10
|
android.os.Bundle |
getWifiProfile(java.lang.String ssid)
Get wifi profile.
|
android.os.Bundle |
getWifiRandomizedMacStatus(java.lang.String ssid)
Get Wifi Randomized MAC Status
|
android.os.Bundle |
getWLANConnectState()
Get WLAN Connect State
|
android.os.Bundle |
getWLANIpAddress()
Get WLAN IP Address
|
android.os.Bundle |
getWLANMACAddress()
Get WLAN MAC Address
|
android.os.Bundle |
getWLANSignalStrength()
Get WLAN Signal Strength
|
android.os.Bundle |
isProfileExisted(java.lang.String ssid)
Is profile existed bundle.
|
android.os.Bundle |
isProfilesEmpty()
Is profiles empty bundle.
|
android.os.Bundle |
removeAllProfiles()
Remove all profiles bundle.
|
android.os.Bundle |
setCaptivePortalHttpsUrl(java.lang.String url)
Set the URL used for HTTPS captive portal detection upon a new connection.
|
android.os.Bundle |
setCaptivePortalHttpUrl(java.lang.String url)
Set the URL used for HTTP captive portal detection upon a new connection.
|
android.os.Bundle |
setCaptivePortalMode(int mode)
Set captive portal detection mode to the specific mode
|
android.os.Bundle |
setCaptivePortalUseHttps(int mode)
Whether to use HTTPS for network validation.
|
android.os.Bundle |
setIpAssignmentProfile(java.lang.String ssid,
int ipAssignment,
java.lang.String ipAddress,
int prefixLength,
java.lang.String gateway,
java.lang.String dns1,
java.lang.String dns2)
Set ip assignment profile.
|
android.os.Bundle |
setProxyProfile(java.lang.String ssid,
int proxySetting,
java.lang.String pacUrl,
java.lang.String host,
int port,
java.lang.String excList)
Sets proxy profile.
|
android.os.Bundle |
setWifiAdapter(boolean enabled)
Set WifiAdapter Switch
|
android.os.Bundle |
setWifiEnterpriseProfile(java.lang.String ssid,
java.lang.String certPath,
java.lang.String identity,
java.lang.String password)
Set Wifi Enterprise Profile
|
android.os.Bundle |
setWifiProfile(java.lang.String ssid,
java.lang.String password,
int securityMode)
Set wifi profile.
|
android.os.Bundle |
setWifiRandomizedMac(java.lang.String ssid,
boolean enabled)
Set WiFi Randomized MAC
Need to reconnect specific WiFi
|
public static final java.lang.String BUNDLE_ERROR_CODE
public static final java.lang.String BUNDLE_ERROR_MSG
public static final java.lang.String BUNDLE_ENABLED
public static final int RESULT_CODE_ERROR
public static final int RESULT_CODE_SUCCESS
public WlanCtrl(android.content.Context context)
context - the contextpublic android.os.Bundle setWifiProfile(java.lang.String ssid,
java.lang.String password,
int securityMode)
ssid - the ssid (String)password - the password (String)securityMode - the security mode (int) (None:0, WEP:1, WPA:2)public android.os.Bundle getWifiProfile(java.lang.String ssid)
ssid - the ssidpublic android.os.Bundle setIpAssignmentProfile(java.lang.String ssid,
int ipAssignment,
java.lang.String ipAddress,
int prefixLength,
java.lang.String gateway,
java.lang.String dns1,
java.lang.String dns2)
ssid - the ssid (String)ipAssignment - the ip assignment (int) (DHCP:0 , STATIC:1) (If set DHCP, other parameters is invalid.)ipAddress - the ip address (String)prefixLength - the prefix length (int)gateway - the gateway (String)dns1 - the dns 1 (String)dns2 - the dns 2 (String)public android.os.Bundle getIpAssignmentProfile(java.lang.String ssid)
ssid - the ssidpublic android.os.Bundle setProxyProfile(java.lang.String ssid,
int proxySetting,
java.lang.String pacUrl,
java.lang.String host,
int port,
java.lang.String excList)
ssid - the ssid (String)proxySetting - the proxy setting (None:0, Manual:1, Proxy Auto-Config:2)pacUrl - the pac url (String)host - the host (String)port - the port (int)excList - the exc list (String)public android.os.Bundle getProxyProfile(java.lang.String ssid)
ssid - the ssid (only run in PA760, A9 and A10)public android.os.Bundle deleteProfile(java.lang.String ssid)
ssid - the ssid (String)public android.os.Bundle isProfileExisted(java.lang.String ssid)
ssid - the ssid (String)public android.os.Bundle connectProfile(java.lang.String ssid)
ssid - the ssid (String)public android.os.Bundle getConnectedProfile()
public android.os.Bundle removeAllProfiles()
public android.os.Bundle isProfilesEmpty()
public android.os.Bundle setCaptivePortalMode(int mode)
mode - Captive portal detection mode:public android.os.Bundle setCaptivePortalHttpUrl(java.lang.String url)
url - The URL used for HTTP captive portal detection upon a new connection.public android.os.Bundle setCaptivePortalUseHttps(int mode)
mode - Whether to use HTTPS for network validation.public android.os.Bundle setCaptivePortalHttpsUrl(java.lang.String url)
url - The URL used for HTTPS captive portal detection upon a new connection.
A 204 response code from the server is used for validation.public android.os.Bundle setWifiAdapter(boolean enabled)
enabled, - true or false (boolean)public android.os.Bundle setWifiEnterpriseProfile(java.lang.String ssid,
java.lang.String certPath,
java.lang.String identity,
java.lang.String password)
ssid, - the ssid (String)certPath, - the cerPath (String)identity, - the identity (String)password, - the password (String)public android.os.Bundle getWifiRandomizedMacStatus(java.lang.String ssid)
ssid, - the ssid (String)public android.os.Bundle setWifiRandomizedMac(java.lang.String ssid,
boolean enabled)
ssid, - the ssid (String)enabled, - enable the WiFi randomize MAC or not (boolean)public android.os.Bundle getWLANMACAddress()
public android.os.Bundle getWLANIpAddress()
public android.os.Bundle getWLANSignalStrength()
public android.os.Bundle getWLANConnectState()