Class WiFiManager
Definition
- Namespace:
- Tizen.Network.WiFi
- Assembly:
- Tizen.Network.WiFi.dll
- API Level:
- 3
A manager class which allows applications to connect to a Wireless Local Area Network (WLAN) and transfer data over the network. The Wi-Fi Manager enables your application to activate and deactivate a local Wi-Fi device, and to connect to a WLAN network in the infrastructure mode.
C#Copypublic static class WiFiManager
- Inheritance
-
System.ObjectWiFiManager
Properties
Declaration
C#Copypublic static WiFiConnectionState ConnectionState { get; }
Property Value
Type | Description |
---|---|
WiFiConnectionState | Represents the connection state of the Wi-Fi. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Declaration
C#Copypublic static string InterfaceName { get; }
Property Value
Type | Description |
---|---|
System.String | Interface name of the Wi-Fi. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Declaration
C#Copypublic static bool IsActive { get; }
Property Value
Type | Description |
---|---|
System.Boolean | Boolean value to check whether Wi-Fi is activated or not. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Declaration
C#Copypublic static string MacAddress { get; }
Property Value
Type | Description |
---|---|
System.String | Represents the MAC address of the Wi-Fi. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Declaration
C#Copypublic static WiFiScanState ScanState { get; }
Property Value
Type | Description |
---|---|
WiFiScanState | Represents the scan state of the Wi-Fi. |
API Level: 6
Methods
Declaration
C#Copypublic static Task ActivateAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating whether the activate method is done or not. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
NowInProgressException | Thrown when the Wi-Fi activation is now in progress. |
UnauthorizedAccessException | Thrown when the permission is denied. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.sethttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
ActivateWithPickerAsync()
Activates the Wi-Fi asynchronously and displays the Wi-Fi picker (popup) when the Wi-Fi is not automatically connected.
Declaration
C#Copypublic static Task ActivateWithPickerAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating whether the ActivateWithPicker method is done or not. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
NowInProgressException | Thrown when the Wi-Fi activation is now in progress. |
UnauthorizedAccessException | Thrown when the permission is denied. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.sethttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
Declaration
C#Copypublic static Task BssidScanAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating whether the BssidScanAsync method is done or not. |
Remarks
This method must be called from MainThread.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
UnauthorizedAccessException | Thrown when the permission is denied. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
API Level: 5
Privilege Level: public
Privilege: http://tizen.org/privilege/network.sethttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
Declaration
C#Copypublic static Task DeactivateAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating whether the deactivate method is done or not. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
NowInProgressException | Thrown when the Wi-Fi deactivation is now in progress. |
UnauthorizedAccessException | Thrown when the permission is denied. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.sethttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
Declaration
C#Copypublic static WiFiAP GetConnectedAP()
Returns
Type | Description |
---|---|
WiFiAP | The connected Wi-Fi access point (AP) information. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
UnauthorizedAccessException | Thrown when the permission is denied. |
OutOfMemoryException | Thrown when system is out of memory. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
Declaration
C#Copypublic static IEnumerable<WiFiAP> GetFoundAPs()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<WiFiAP> | A list of the WiFiAP objects. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
UnauthorizedAccessException | Thrown when the permission is denied. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
Declaration
C#Copypublic static IEnumerable<WiFiAP> GetFoundBssids()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<WiFiAP> | A list of the WiFiAP objects. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
UnauthorizedAccessException | Thrown when the permission is denied. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
API Level: 5
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
Declaration
C#Copypublic static IEnumerable<WiFiAP> GetFoundSpecificAPs()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<WiFiAP> | A list containing the WiFiAP objects. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
UnauthorizedAccessException | Thrown when the permission is denied. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
Declaration
C#Copypublic static IEnumerable<WiFiConfiguration> GetWiFiConfigurations()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<WiFiConfiguration> | A list containing the WiFiConfiguration objects. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
UnauthorizedAccessException | Thrown when the permission is denied. |
OutOfMemoryException | Thrown when system is out of memory. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.profile
Feature: http://tizen.org/feature/network.wifi
SaveWiFiConfiguration(WiFiConfiguration)
Saves the Wi-Fi configuration of the access point.
Declaration
C#Copypublic static void SaveWiFiConfiguration(WiFiConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
WiFiConfiguration | configuration | The configuration to be stored. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
UnauthorizedAccessException | Thrown when the permission is denied. |
ArgumentNullException | Thrown when WiFiConfiguration is passed as null. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.profile
Feature: http://tizen.org/feature/network.wifi
Declaration
C#Copypublic static Task ScanAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating whether the scan method is done or not. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
UnauthorizedAccessException | Thrown when the permission is denied. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.sethttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
Declaration
C#Copypublic static Task ScanSpecificAPAsync(string essid)
Parameters
Type | Name | Description |
---|---|---|
System.String | essid | The ESSID of the hidden AP. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating whether the ScanSpecificAP method is done or not. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
UnauthorizedAccessException | Thrown when the permission is denied. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.sethttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
Events
BackgroundScanFinished
BackgroundScanFinished is raised when the background scan is finished. The background scan starts automatically when Wi-Fi is activated. The callback will be invoked periodically.
Declaration
C#Copypublic static event EventHandler BackgroundScanFinished
Event Type
Type | Description |
---|---|
System.EventHandler |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
ConnectionStateChanged
ConnectionStateChanged is raised when the connection state is changed.
Declaration
C#Copypublic static event EventHandler<ConnectionStateChangedEventArgs> ConnectionStateChanged
Event Type
Type | Description |
---|---|
System.EventHandler<ConnectionStateChangedEventArgs> |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
Declaration
C#Copypublic static event EventHandler<DeviceStateChangedEventArgs> DeviceStateChanged
Event Type
Type | Description |
---|---|
System.EventHandler<DeviceStateChangedEventArgs> |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
RssiLevelChanged
RssiLevelChanged is raised when the RSSI of the connected Wi-Fi is changed.
Declaration
C#Copypublic static event EventHandler<RssiLevelChangedEventArgs> RssiLevelChanged
Event Type
Type | Description |
---|---|
System.EventHandler<RssiLevelChangedEventArgs> |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
Declaration
C#Copypublic static event EventHandler<ScanStateChangedEventArgs> ScanStateChanged
Event Type
Type | Description |
---|---|
System.EventHandler<ScanStateChangedEventArgs> |