Network​Operator​Tethering​Manager Network​Operator​Tethering​Manager Network​Operator​Tethering​Manager Class

Definition

This interface exposes the methods and properties used to control and configure tethering capabilities for a specific network account.

public : sealed class NetworkOperatorTetheringManager : INetworkOperatorTetheringClientManager, INetworkOperatorTetheringManagerpublic sealed class NetworkOperatorTetheringManager : INetworkOperatorTetheringClientManager, INetworkOperatorTetheringManagerPublic NotInheritable Class NetworkOperatorTetheringManager Implements INetworkOperatorTetheringClientManager, INetworkOperatorTetheringManager
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

ClientCount ClientCount ClientCount

Gets the current number of connected clients on the tethering network.

public : unsigned short ClientCount { get; }public uint ClientCount { get; }Public ReadOnly Property ClientCount As uint
Value
unsigned short uint uint

The current number of clients.

Attributes

MaxClientCount MaxClientCount MaxClientCount

Gets the maximum number of client connections over a tethered network.

public : unsigned short MaxClientCount { get; }public uint MaxClientCount { get; }Public ReadOnly Property MaxClientCount As uint
Value
unsigned short uint uint

The maximum number of client connections

Attributes

TetheringOperationalState TetheringOperationalState TetheringOperationalState

Gets the current operational state of the tethering feature. Possible values are defined by TetheringOperationalState

public : TetheringOperationalState TetheringOperationalState { get; }public TetheringOperationalState TetheringOperationalState { get; }Public ReadOnly Property TetheringOperationalState As TetheringOperationalState
Attributes

Methods

ConfigureAccessPointAsync(NetworkOperatorTetheringAccessPointConfiguration) ConfigureAccessPointAsync(NetworkOperatorTetheringAccessPointConfiguration) ConfigureAccessPointAsync(NetworkOperatorTetheringAccessPointConfiguration)

Use this method to provide tethering network configuration details for the tethering network.

public : IAsyncAction ConfigureAccessPointAsync(NetworkOperatorTetheringAccessPointConfiguration configuration)public IAsyncAction ConfigureAccessPointAsync(NetworkOperatorTetheringAccessPointConfiguration configuration)Public Function ConfigureAccessPointAsync(configuration As NetworkOperatorTetheringAccessPointConfiguration) As IAsyncAction
Parameters
configuration
NetworkOperatorTetheringAccessPointConfiguration NetworkOperatorTetheringAccessPointConfiguration NetworkOperatorTetheringAccessPointConfiguration

Provides a network account ID (SSID) and specifies the passphrase used for authentication when establishing a tethered network connection.

Returns

The asynchronous action.

Attributes

CreateFromConnectionProfile(ConnectionProfile) CreateFromConnectionProfile(ConnectionProfile) CreateFromConnectionProfile(ConnectionProfile)

Creates a NetworkOperatorTetheringManager using the given profile as the public interface and Wi-Fi as the private interface.

public : static NetworkOperatorTetheringManager CreateFromConnectionProfile(ConnectionProfile profile)public static NetworkOperatorTetheringManager CreateFromConnectionProfile(ConnectionProfile profile)Public Static Function CreateFromConnectionProfile(profile As ConnectionProfile) As NetworkOperatorTetheringManager
Parameters
profile
ConnectionProfile ConnectionProfile ConnectionProfile

Connection profile to be used.

Returns
Attributes

Remarks

In previous releases, only privileged apps from network operators could create a NetworkOperatorTetheringManager object and use it to control tethering. In this release, any app can create the object by calling CreateFromConnectionProfile. In order for the call to succeed, however, the app must have the appropriate Wi-Fi control device capability declared in its manifest. The following example shows part of a manifest with the necessary DeviceCapability tag, with the wiFiControl attribute.

<Capabilities>
  <DeviceCapability Name="wiFiControl"/>
</Capabilities>

If the wiFiControl device capability is not set in the manifest, then calls to CreateFromConnectionProfile fail by throwing an exception.

Your code can determine whether the capability is set at runtime by calling GetTetheringCapabilityFromConnectionProfile. If DisabledBySystemCapability is returned, then the manifest does not set the required device capability. Note that even if Enabled is returned, your code should be written to handle errors and exceptions, since tethering capability can change at any time, outside your app's control or notice.

See Also

CreateFromConnectionProfile(ConnectionProfile, NetworkAdapter) CreateFromConnectionProfile(ConnectionProfile, NetworkAdapter) CreateFromConnectionProfile(ConnectionProfile, NetworkAdapter)

Creates a NetworkOperatorTetheringManager using the given profile as the public interface, and on the given NetworkAdapter as the private interface.

public : static NetworkOperatorTetheringManager CreateFromConnectionProfile(ConnectionProfile profile, NetworkAdapter adapter)public static NetworkOperatorTetheringManager CreateFromConnectionProfile(ConnectionProfile profile, NetworkAdapter adapter)Public Static Function CreateFromConnectionProfile(profile As ConnectionProfile, adapter As NetworkAdapter) As NetworkOperatorTetheringManager
Parameters
profile
ConnectionProfile ConnectionProfile ConnectionProfile

Connection profile to be used.

adapter
NetworkAdapter NetworkAdapter NetworkAdapter

The network adapter where the connection is shared. The shared connection will be controlled by the NetworkOperatorTetheringManager.

Returns
Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

In previous releases, only privileged apps from network operators could create a NetworkOperatorTetheringManager object and use it to control tethering. In this release, any app can create the object by calling CreateFromConnectionProfile. In order for the call to succeed, however, the app must have the appropriate Wi-Fi control device capability declared in its manifest. The following example shows part of a manifest with the necessary DeviceCapability tag, with the wiFiControl attribute.

<Capabilities>
  <DeviceCapability Name="wiFiControl"/>
</Capabilities>

If the wiFiControl device capability is not set in the manifest, then calls to CreateFromConnectionProfile fail by throwing an exception.

Your code can determine whether the capability is set at runtime by calling GetTetheringCapabilityFromConnectionProfile. If DisabledBySystemCapability is returned, then the manifest does not set the required device capability. Note that even if Enabled is returned, your code should be written to handle errors and exceptions, since tethering capability can change at any time, outside your app's control or notice.

See Also

CreateFromNetworkAccountId(String) CreateFromNetworkAccountId(String) CreateFromNetworkAccountId(String)

Creates an instance of NetworkOperatorTetheringManager for a specific network account using the provided network account ID for the mobile broadband device.

public : static NetworkOperatorTetheringManager CreateFromNetworkAccountId(PlatForm::String networkAccountId)public static NetworkOperatorTetheringManager CreateFromNetworkAccountId(String networkAccountId)Public Static Function CreateFromNetworkAccountId(networkAccountId As String) As NetworkOperatorTetheringManager
Parameters
networkAccountId
PlatForm::String String String

The network account ID.

Returns
Attributes

Remarks

Always call GetTetheringCapability prior to the creation of the tethering network using CreateFromNetworkAccountId to first confirm that the system is capable of creating a tethering network.

GetCurrentAccessPointConfiguration() GetCurrentAccessPointConfiguration() GetCurrentAccessPointConfiguration()

Gets the current access point configuration for a network account as defined by a NetworkOperatorTetheringAccessPointConfiguration object.

public : NetworkOperatorTetheringAccessPointConfiguration GetCurrentAccessPointConfiguration()public NetworkOperatorTetheringAccessPointConfiguration GetCurrentAccessPointConfiguration()Public Function GetCurrentAccessPointConfiguration() As NetworkOperatorTetheringAccessPointConfiguration
Returns

Indicates the network account id and specifies the pass-phrase used for authentication when establishing a connection over the tethering network.

Attributes

GetTetheringCapability(String) GetTetheringCapability(String) GetTetheringCapability(String)

Indicates if a device is capable of creating a tethering network. Possible values are defined by TetheringCapability.

public : static TetheringCapability GetTetheringCapability(PlatForm::String networkAccountId)public static TetheringCapability GetTetheringCapability(String networkAccountId)Public Static Function GetTetheringCapability(networkAccountId As String) As TetheringCapability
Parameters
networkAccountId
PlatForm::String String String

The network account ID.

Returns

The tethering capabilities of a network account.

Attributes

Remarks

Always call GetTetheringCapability prior to the creation of the tethering network using CreateFromNetworkAccountId to first confirm that the system is capable of creating a tethering network.

GetTetheringCapabilityFromConnectionProfile(ConnectionProfile) GetTetheringCapabilityFromConnectionProfile(ConnectionProfile) GetTetheringCapabilityFromConnectionProfile(ConnectionProfile)

Gets tethering capabilities, based on the given connection profile.

public : static TetheringCapability GetTetheringCapabilityFromConnectionProfile(ConnectionProfile profile)public static TetheringCapability GetTetheringCapabilityFromConnectionProfile(ConnectionProfile profile)Public Static Function GetTetheringCapabilityFromConnectionProfile(profile As ConnectionProfile) As TetheringCapability
Parameters
profile
ConnectionProfile ConnectionProfile ConnectionProfile

Connection profile to be checked.

Returns

Tethering capabilities of the connection profile.

Attributes

GetTetheringClients() GetTetheringClients() GetTetheringClients()

Retrieves a list of tethering clients for this NetworkOperatorTetheringManager.

public : IVectorView<NetworkOperatorTetheringClient> GetTetheringClients()public IReadOnlyList<NetworkOperatorTetheringClient> GetTetheringClients()Public Function GetTetheringClients() As IReadOnlyList( Of NetworkOperatorTetheringClient )
Returns
IVectorView<NetworkOperatorTetheringClient> IReadOnlyList<NetworkOperatorTetheringClient> IReadOnlyList<NetworkOperatorTetheringClient>

A list of clients.

Attributes

StartTetheringAsync() StartTetheringAsync() StartTetheringAsync()

Establishes the tethering network.

public : IAsyncOperation<NetworkOperatorTetheringOperationResult> StartTetheringAsync()public IAsyncOperation<NetworkOperatorTetheringOperationResult> StartTetheringAsync()Public Function StartTetheringAsync() As IAsyncOperation( Of NetworkOperatorTetheringOperationResult )
Returns
Attributes

StopTetheringAsync() StopTetheringAsync() StopTetheringAsync()

Shuts down the tethering network.

public : IAsyncOperation<NetworkOperatorTetheringOperationResult> StopTetheringAsync()public IAsyncOperation<NetworkOperatorTetheringOperationResult> StopTetheringAsync()Public Function StopTetheringAsync() As IAsyncOperation( Of NetworkOperatorTetheringOperationResult )
Returns
Attributes