NetworkOperatorTetheringManager NetworkOperatorTetheringManager NetworkOperatorTetheringManager NetworkOperatorTetheringManager 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, INetworkOperatorTetheringManager
public sealed class NetworkOperatorTetheringManager : INetworkOperatorTetheringClientManager, INetworkOperatorTetheringManager
Public NotInheritable Class NetworkOperatorTetheringManager Implements INetworkOperatorTetheringClientManager, INetworkOperatorTetheringManager
// This class does not provide a public constructor.
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)
Capabilities
cellularDeviceControl cellularDeviceIdentity

Properties

ClientCount ClientCount ClientCount ClientCount

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

public : unsigned int ClientCount { get; }
public uint ClientCount { get; }
Public ReadOnly Property ClientCount As uint
var uint = networkOperatorTetheringManager.clientCount;
Value
unsigned int uint uint uint

The current number of clients.

Additional features and 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)
Capabilities
cellularDeviceControl cellularDeviceIdentity

MaxClientCount MaxClientCount MaxClientCount MaxClientCount

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

public : unsigned int MaxClientCount { get; }
public uint MaxClientCount { get; }
Public ReadOnly Property MaxClientCount As uint
var uint = networkOperatorTetheringManager.maxClientCount;
Value
unsigned int uint uint uint

The maximum number of client connections

Additional features and 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)
Capabilities
cellularDeviceControl cellularDeviceIdentity

TetheringOperationalState 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
var tetheringOperationalState = networkOperatorTetheringManager.tetheringOperationalState;
Additional features and 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)
Capabilities
cellularDeviceControl cellularDeviceIdentity

Methods

ConfigureAccessPointAsync(NetworkOperatorTetheringAccessPointConfiguration) 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
Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager.configureAccessPointAsync(configuration).done( /* Your success and error handlers */ );
Parameters
configuration
NetworkOperatorTetheringAccessPointConfiguration NetworkOperatorTetheringAccessPointConfiguration NetworkOperatorTetheringAccessPointConfiguration NetworkOperatorTetheringAccessPointConfiguration

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

Returns
Additional features and 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)
Capabilities
cellularDeviceControl cellularDeviceIdentity

CreateFromConnectionProfile(ConnectionProfile) 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
var networkOperatorTetheringManager = Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager.createFromConnectionProfile(profile);
Parameters
Returns
Additional features and 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)
Capabilities
cellularDeviceControl cellularDeviceIdentity

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) 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
var networkOperatorTetheringManager = Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager.createFromConnectionProfile(profile, adapter);
Parameters
adapter
NetworkAdapter NetworkAdapter NetworkAdapter NetworkAdapter

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

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

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) 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
var networkOperatorTetheringManager = Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager.createFromNetworkAccountId(networkAccountId);
Parameters
networkAccountId
Platform::String String String String

The network account ID.

Returns
Additional features and 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)
Capabilities
cellularDeviceControl cellularDeviceIdentity

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() 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
var networkOperatorTetheringAccessPointConfiguration = networkOperatorTetheringManager.getCurrentAccessPointConfiguration();
Returns

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

Additional features and 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)
Capabilities
cellularDeviceControl cellularDeviceIdentity

GetTetheringCapability(String) 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
var tetheringCapability = Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager.getTetheringCapability(networkAccountId);
Parameters
networkAccountId
Platform::String String String String

The network account ID.

Returns

The tethering capabilities of a network account.

Additional features and 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)
Capabilities
cellularDeviceControl cellularDeviceIdentity

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) 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
var tetheringCapability = Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager.getTetheringCapabilityFromConnectionProfile(profile);
Parameters
profile
ConnectionProfile ConnectionProfile ConnectionProfile ConnectionProfile

Connection profile to be checked.

Returns

Tethering capabilities of the connection profile.

Additional features and 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)
Capabilities
cellularDeviceControl cellularDeviceIdentity

GetTetheringClients() 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<NetworkOperatorTetheringClient>( Of NetworkOperatorTetheringClient )
var iVectorView = networkOperatorTetheringManager.getTetheringClients();
Returns
IVectorView<NetworkOperatorTetheringClient> IReadOnlyList<NetworkOperatorTetheringClient> IReadOnlyList<NetworkOperatorTetheringClient> IReadOnlyList<NetworkOperatorTetheringClient>

A list of clients.

Additional features and 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)
Capabilities
cellularDeviceControl cellularDeviceIdentity

StartTetheringAsync() StartTetheringAsync() StartTetheringAsync() StartTetheringAsync()

Establishes the tethering network.

public : IAsyncOperation<NetworkOperatorTetheringOperationResult> StartTetheringAsync()
public IAsyncOperation<NetworkOperatorTetheringOperationResult> StartTetheringAsync()
Public Function StartTetheringAsync() As IAsyncOperation( Of NetworkOperatorTetheringOperationResult )
Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager.startTetheringAsync().done( /* Your success and error handlers */ );
Returns
Additional features and 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)
Capabilities
cellularDeviceControl cellularDeviceIdentity

StopTetheringAsync() StopTetheringAsync() StopTetheringAsync() StopTetheringAsync()

Shuts down the tethering network.

public : IAsyncOperation<NetworkOperatorTetheringOperationResult> StopTetheringAsync()
public IAsyncOperation<NetworkOperatorTetheringOperationResult> StopTetheringAsync()
Public Function StopTetheringAsync() As IAsyncOperation( Of NetworkOperatorTetheringOperationResult )
Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager.stopTetheringAsync().done( /* Your success and error handlers */ );
Returns
Additional features and 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)
Capabilities
cellularDeviceControl cellularDeviceIdentity