Class WiFiDirectManager

Definition

Namespace:
Tizen.Network.WiFiDirect
Assembly:
Tizen.Network.WiFiDirect.dll
API Level:
3

A class which is used to manage settings of Wi-Fi Direct.
This class is used to discover peer devices and manage settings of Wi-Fi Direct.

C#
Copy
public static class WiFiDirectManager
Inheritance
System.Object
WiFiDirectManager

Properties

View Source

AutoConnect

Gets and sets the AutoConnect.

Declaration
C#
Copy
public static bool AutoConnect { get; set; }
Property Value
Type Description
Boolean

Autoconnection mode status.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

GatewayAddress

Gets the GatewayAddress.

Declaration
C#
Copy
public static string GatewayAddress { get; }
Property Value
Type Description
System.String

Gateway address.

Remarks

Wi-Fi Direct must be activated. If it is deactivated, null will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

GroupOwnerIntent

Gets and sets the GroupOwnerIntent.

Declaration
C#
Copy
public static int GroupOwnerIntent { get; set; }
Property Value
Type Description
Int32

Intent of the group owner.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

IpAddress

Gets the IpAddress.

Declaration
C#
Copy
public static string IpAddress { get; }
Property Value
Type Description
System.String

IP address of a local device.

Remarks

Wi-Fi Direct must be activated. If it is deactivated, null will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

IsAutonomousGroup

Gets the IsAutonomousGroup.

Declaration
C#
Copy
public static bool IsAutonomousGroup { get; }
Property Value
Type Description
Boolean

A property to check whether the current group is the autonomous group or not.

Remarks

Wi-Fi Direct must be activated. If it is deactivated, false will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

IsDiscoverable

A property to check whether the device is discoverable or not by P2P discovery.

Declaration
C#
Copy
public static bool IsDiscoverable { get; }
Property Value
Type Description
Boolean
Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

IsGroupOwner

Gets the IsGroupOwner.

Declaration
C#
Copy
public static bool IsGroupOwner { get; }
Property Value
Type Description
Boolean

A property to check whether the device is group owner or not.

Remarks

Wi-Fi Direct must be activated. If it is deactivated, false will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

IsListenOnly

Gets the IsListenOnly.

Declaration
C#
Copy
public static bool IsListenOnly { get; }
Property Value
Type Description
Boolean

A property to check whether the local device is listening only.

Remarks

Wi-Fi Direct must be activated. If it is deactivated, false will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

MacAddress

Gets the MacAddress.

Declaration
C#
Copy
public static string MacAddress { get; }
Property Value
Type Description
System.String

Mac address of a local device.

Remarks

If there is any error, null will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

MaxClients

Gets and sets the MaxClients.

Declaration
C#
Copy
public static int MaxClients { get; set; }
Property Value
Type Description
Int32

Max number of clients.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

Name

Gets and sets the Name.

Declaration
C#
Copy
public static string Name { get; set; }
Property Value
Type Description
System.String

Name of local device.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

NetworkInterface

Gets the NetworkInterface.

Declaration
C#
Copy
public static string NetworkInterface { get; }
Property Value
Type Description
System.String

Name of network interface.

Remarks

Wi-Fi Direct must be activated. If it is deactivated, null will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

OperatingChannel

Gets the OperatingChannel.

Declaration
C#
Copy
public static int OperatingChannel { get; }
Property Value
Type Description
Int32

Channel number on which the P2P Device is operating as the P2P Group.

Remarks

If there is any error, -1 will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

Passphrase

Gets and sets the Passphrase. It is used during Wi-Fi Direct Group creation.

Declaration
C#
Copy
public static string Passphrase { get; set; }
Property Value
Type Description
System.String

Wi-Fi Protected Access (WPA) password.

Remarks

Wi-Fi Direct must be activated. If it is deactivated, null will be returned during get and Not permitted exception message will be returned during set.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

PersistentGroupEnabled

Gets and sets the PersistentGroupEnabled.

Declaration
C#
Copy
public static bool PersistentGroupEnabled { get; set; }
Property Value
Type Description
Boolean

A property to check whether persistent group is enabled.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

PrimaryType

Gets the PrimaryType.

Declaration
C#
Copy
public static WiFiDirectPrimaryDeviceType PrimaryType { get; }
Property Value
Type Description
WiFiDirectPrimaryDeviceType

Primary device type of local device.

Remarks

If there is any error, 0 will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

RequestedWps

Gets and sets the RequestedWps.

Declaration
C#
Copy
public static WiFiDirectWpsType RequestedWps { get; set; }
Property Value
Type Description
WiFiDirectWpsType

Requested WPS (Wi-Fi Protected Setup) type.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

SecondaryType

Gets the SecondaryType.

Declaration
C#
Copy
public static WiFiDirectSecondaryDeviceType SecondaryType { get; }
Property Value
Type Description
WiFiDirectSecondaryDeviceType

Secondary device type of local device.

Remarks

If there is any error, 0 will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

SessionTimer

Gets and sets the SessionTimer.

Declaration
C#
Copy
public static int SessionTimer { get; set; }
Property Value
Type Description
Int32

Connection session timer value in second.

Remarks

Wi-Fi Direct must be activated. If it is deactivated, -1 will be returned during get and Not permitted exception message will be returned during set.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

Ssid

Gets the Ssid.

Declaration
C#
Copy
public static string Ssid { get; }
Property Value
Type Description
System.String

SSID of local device.

Remarks

If there is any error, null will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

State

Gets the State.

Declaration
C#
Copy
public static WiFiDirectState State { get; }
Property Value
Type Description
WiFiDirectState

State of Wi-Fi direct service.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

SubnetMask

Gets the SubnetMask.

Declaration
C#
Copy
public static string SubnetMask { get; }
Property Value
Type Description
System.String

Subnet mask.

Remarks

Wi-Fi Direct must be activated. If it is deactivated, null will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

Wps

Gets the Wps.

Declaration
C#
Copy
public static WiFiDirectWpsType Wps { get; }
Property Value
Type Description
WiFiDirectWpsType

WPS (Wi-Fi Protected Setup) type.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

WpsMode

Gets the WpsMode.

Declaration
C#
Copy
public static int WpsMode { get; }
Property Value
Type Description
Int32

Supported WPS (Wi-Fi Protected Setup) types at local device.

Remarks

If there is any error, -1 will be returned.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
View Source

WpsPin

Gets and sets the WpsPin.

Declaration
C#
Copy
public static string WpsPin { get; set; }
Property Value
Type Description
System.String

WPS PIN number.

Remarks

Wi-Fi Direct must be activated. If it is deactivated, null will be returned during get and Not permitted exception message will be returned during set.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect

Methods

View Source

Activate()

Activates the Wi-Fi Direct service.

Declaration
C#
Copy
public static void Activate()
Remarks

If this succeeds, DeviceStateChanged event will be invoked.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
View Source

ActivatePushButton()

Set the WPS config PBC as preferred method for connection.

Declaration
C#
Copy
public static void ActivatePushButton()
Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect
View Source

CancelDiscovery()

Cancels discovery process.

Declaration
C#
Copy
public static void CancelDiscovery()
Remarks

Discovery must be started by StartDiscovery. If this succeeds, DiscoveryStateChanged and PeerFound event will be invoked.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect
View Source

CreateGroup()

Creates a Wi-Fi Direct group and sets up device as the group owner.

Declaration
C#
Copy
public static void CreateGroup()
Remarks

Wi-Fi Direct must be activated. If this succeeds, ConnectionStatusChanged event will be invoked with GroupCreated.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect
View Source

Deactivate()

Deactivates the Wi-Fi Direct service.

Declaration
C#
Copy
public static void Deactivate()
Remarks

Wi-Fi Direct must be activated. If this succeeds, DeviceStateChanged event will be invoked.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect
View Source

DeinitDisplay()

Disable Wi-Fi Display(WFD) functionality and disable the support of WFD Information Element(IE).

Declaration
C#
Copy
public static void DeinitDisplay()
Remarks

Wi-Fi Direct must be activated and WFD must be enabled.

Exceptions
Type Condition
System.NotSupportedException

Thrown during one of the following cases :

  1. When the wifidirect is not supported
  2. When the wifidirect display feature is not supported
System.InvalidOperationException

The object is in invalid state.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect http://tizen.org/feature/network.wifi.direct.display
View Source

DeregisterService(UInt32)

Deregisters for a service used for WiFi Direct Service Discovery.

Declaration
C#
Copy
public static void DeregisterService(uint serviceId)
Parameters
Type Name Description
System.UInt32 serviceId

Service ID for which service has to be deregistered.

Remarks

Wi-Fi Direct must be activated.

Exceptions
Type Condition
System.NotSupportedException

Thrown during one of the following cases :

  1. When the wifidirect is not supported
  2. When the wifidirect service discovery is not supported
System.InvalidOperationException

The object is in invalid state.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect http://tizen.org/feature/network.wifi.direct.service_discovery
View Source

DestroyGroup()

Destroys the Wi-Fi Direct group owned by a local device.If creating a group is in progress, this API cancels that process.

Declaration
C#
Copy
public static void DestroyGroup()
Remarks

Wi-Fi Direct must be activated. If this succeeds, ConnectionStatusChanged event will be invoked with GroupDestroyed.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect
View Source

DisconnectAll()

Disconnects all connected links to peers.

Declaration
C#
Copy
public static void DisconnectAll()
Remarks

Wi-Fi Direct must be activated. If this succeeds, ConnectionStatusChanged event will be invoked.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect
View Source

GetConnectedPeers()

Gets the information of connected peers.

Declaration
C#
Copy
public static IEnumerable<WiFiDirectPeer> GetConnectedPeers()
Returns
Type Description
System.Collections.Generic.IEnumerable<WiFiDirectPeer>

List of connected peer objects.

Remarks

Wi-Fi Direct must be activated.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect
View Source

GetDiscoveredPeers()

Gets the information of discovered peers.

Declaration
C#
Copy
public static IEnumerable<WiFiDirectPeer> GetDiscoveredPeers()
Returns
Type Description
System.Collections.Generic.IEnumerable<WiFiDirectPeer>

List of discovered peer objects.

Remarks

Wi-Fi Direct must be activated.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect
View Source

GetPersistentGroups()

Gets the persistent groups.

Declaration
C#
Copy
public static IEnumerable<WiFiDirectPersistentGroup> GetPersistentGroups()
Returns
Type Description
System.Collections.Generic.IEnumerable<WiFiDirectPersistentGroup>

List of the persistent group objects.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect
View Source

GetSupportedWpsTypes()

Gets the supported WPS types.

Declaration
C#
Copy
public static IEnumerable<WiFiDirectWpsType> GetSupportedWpsTypes()
Returns
Type Description
System.Collections.Generic.IEnumerable<WiFiDirectWpsType>

The list of supported wps types.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect
View Source

InitDisplay()

Enables Wi-Fi Display functionality.

Declaration
C#
Copy
public static void InitDisplay()
Remarks

Wi-Fi Direct must be activated.

Exceptions
Type Condition
System.NotSupportedException

Thrown during one of the following cases :

  1. When the wifidirect is not supported
  2. When the wifidirect display feature is not supported
System.InvalidOperationException

The object is in invalid state.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect http://tizen.org/feature/network.wifi.direct.display
View Source

InitMiracast(Boolean)

Initializes or Deintializes the Wi-Fi Direct Display(MIRACAST) service.

Declaration
C#
Copy
public static void InitMiracast(bool enable)
Parameters
Type Name Description
Boolean enable

Enables/Disables service.

Remarks

Wi-Fi Direct must be activated.

Exceptions
Type Condition
System.NotSupportedException

Thrown during one of the following cases :

  1. When the wifidirect is not supported
  2. When the wifidirect display feature is not supported
System.InvalidOperationException

The object is in invalid state.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect http://tizen.org/feature/network.wifi.direct.display
View Source

RegisterService(WiFiDirectServiceType, String, String)

Registers the service.

Declaration
C#
Copy
public static uint RegisterService(WiFiDirectServiceType type, string info, string serviceInfo)
Parameters
Type Name Description
WiFiDirectServiceType type

Type of Wi-Fi Direct Service.

System.String info

Service specific information.

System.String serviceInfo

Service information.

Returns
Type Description
System.UInt32

The service Id of service getting registered.

Remarks

Wi-Fi Direct must be activated. If there is any error while registering service, 0 will be returned.

Exceptions
Type Condition
System.NotSupportedException

Thrown during one of the following cases :

  1. When the wifidirect is not supported
  2. When the wifidirect service discovery is not supported
System.InvalidOperationException

The object is in invalid state.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect http://tizen.org/feature/network.wifi.direct.service_discovery
View Source

RemovePersistentGroup(WiFiDirectPersistentGroup)

Removes a persistent group.

Declaration
C#
Copy
public static void RemovePersistentGroup(WiFiDirectPersistentGroup group)
Parameters
Type Name Description
WiFiDirectPersistentGroup group

Persistent group owner.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect
View Source

SetAutoGroupRemove(Boolean)

Sets the automatic group removal feature when all peers are disconnected.

Declaration
C#
Copy
public static void SetAutoGroupRemove(bool enable)
Parameters
Type Name Description
Boolean enable

Enables/Disables group removal feature.

Remarks

Wi-Fi Direct must be activated. ConnectionStatusChanged event will be invoked with GroupDestroyed when this feature is enabled and there's no connected group client and if device is group owner.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect
View Source

SetDisplay(WiFiDirectDisplayType, Int32, Int32)

Sets the Wi-Fi Display parameters for the WFD IE of local device.

Declaration
C#
Copy
public static void SetDisplay(WiFiDirectDisplayType type, int port, int hdcp)
Parameters
Type Name Description
WiFiDirectDisplayType type

WFD Device Type: define the Role of WFD device like source or sink.

Int32 port

Specifies Session Management Control Port number. It should be 2 bytes(0~65535).

Int32 hdcp

CP support bit: (1 = enable the hdcp support, 0 = disable the hdcp support).

Remarks

Wi-Fi Direct must be activated and WFD must be enabled.

Exceptions
Type Condition
System.NotSupportedException

Thrown during one of the following cases :

  1. When the wifidirect is not supported
  2. When the wifidirect display feature is not supported
System.InvalidOperationException

The object is in invalid state.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect http://tizen.org/feature/network.wifi.direct.display
View Source

SetDisplayAvailability(Boolean)

Sets the Wi-Fi Display session availability.

Declaration
C#
Copy
public static void SetDisplayAvailability(bool availability)
Parameters
Type Name Description
Boolean availability

Wi-Fi Display session availability.

Remarks

Wi-Fi Direct must be activated and WFD must be enabled.

Exceptions
Type Condition
System.NotSupportedException

Thrown during one of the following cases :

  1. When the wifidirect is not supported
  2. When the wifidirect display feature is not supported
System.InvalidOperationException

The object is in invalid state.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect http://tizen.org/feature/network.wifi.direct.display
View Source

StartDiscovery(Boolean, Int32, WiFiDirectDiscoveryChannel)

Starts discovery to find all P2P capable devices.

Declaration
C#
Copy
public static void StartDiscovery(bool listenOnly, int duration, WiFiDirectDiscoveryChannel channel = WiFiDirectDiscoveryChannel.FullScan)
Parameters
Type Name Description
Boolean listenOnly

Listen status.If False, then cycle between Scan and Listen.If True, then skip the initial 802.11 Scan and enter Listen state.

Int32 duration

Duration of discovery period, in seconds.

WiFiDirectDiscoveryChannel channel

Discovery channel.It is optional, default enum value FullScan is assigned.

Remarks

Wi-Fi Direct must be activated. If this succeeds, DiscoveryStateChanged and PeerFound event will be invoked.

Exceptions
Type Condition
System.InvalidOperationException

The object is in invalid state.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

Thrown when application does not have privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/wifidirect
Feature: http://tizen.org/feature/network.wifidirect

Events

View Source

ConnectionStatusChanged

(event) ConnectionStatusChanged is raised when status of connection is changed.

Declaration
C#
Copy
public static event EventHandler<ConnectionStatusChangedEventArgs> ConnectionStatusChanged
Event Type
Type Description
System.EventHandler<ConnectionStatusChangedEventArgs>
API Level: 3
View Source

DeviceStateChanged

(event) DeviceStateChanged is raised when device state is changed.

Declaration
C#
Copy
public static event EventHandler<DeviceStateChangedEventArgs> DeviceStateChanged
Event Type
Type Description
System.EventHandler<DeviceStateChangedEventArgs>
API Level: 3
View Source

DiscoveryStateChanged

(event) DiscoveryStateChanged is raised when Wi-Fi Direct discovery state is changed.

Declaration
C#
Copy
public static event EventHandler<DiscoveryStateChangedEventArgs> DiscoveryStateChanged
Event Type
Type Description
System.EventHandler<DiscoveryStateChangedEventArgs>
API Level: 3
View Source

PeerFound

(event) PeerFound is raised when peer is found.

Declaration
C#
Copy
public static event EventHandler<PeerFoundEventArgs> PeerFound
Event Type
Type Description
System.EventHandler<PeerFoundEventArgs>
API Level: 3
View Source

StateChanged

(event) StateChanged is raised when Wi-Fi Direct state is changed.

Declaration
C#
Copy
public static event EventHandler<StateChangedEventArgs> StateChanged
Event Type
Type Description
System.EventHandler<StateChangedEventArgs>
API Level: 3