MobileBroadbandAccountWatcher MobileBroadbandAccountWatcher MobileBroadbandAccountWatcher MobileBroadbandAccountWatcher Class

Definition

Provides information regarding availability of and updates to Mobile Broadband Accounts.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : sealed class MobileBroadbandAccountWatcher : IMobileBroadbandAccountWatcher
public sealed class MobileBroadbandAccountWatcher : IMobileBroadbandAccountWatcher
Public NotInheritable Class MobileBroadbandAccountWatcher Implements IMobileBroadbandAccountWatcher
var mobileBroadbandAccountWatcher = new mobileBroadbandAccountWatcher();
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

Constructors

MobileBroadbandAccountWatcher() MobileBroadbandAccountWatcher() MobileBroadbandAccountWatcher() MobileBroadbandAccountWatcher()

Creates a new instance of a MobileBroadbandAccountWatcher.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : MobileBroadbandAccountWatcher()
public MobileBroadbandAccountWatcher()
Public Sub New()
var mobileBroadbandAccountWatcher = new mobileBroadbandAccountWatcher();
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

To enable the MobileBroadbandAccountWatcher, call the Start method.

Properties

Status Status Status Status

Gets the status of the account watcher.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : MobileBroadbandAccountWatcherStatus Status { get; }
public MobileBroadbandAccountWatcherStatus Status { get; }
Public ReadOnly Property Status As MobileBroadbandAccountWatcherStatus
var mobileBroadbandAccountWatcherStatus = mobileBroadbandAccountWatcher.status;
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

Start() Start() Start() Start()

Starts the account watcher.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : void Start()
public void Start()
Public Function Start() As void
mobileBroadbandAccountWatcher.start();
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

When you start the account watcher, it first enumerates all Mobile Broadband Accounts and raises an AccountAdded event for each account found. When the enumeration operation is completed, the account watcher raises the EnumerationCompleted event. After the EnumerationCompleted event is raised, the account watcher continues to raise account-related events (AccountAdded, AccountUpdated, and AccountRemoved ) until you call the Stop method.

Note that you do not need to explicitly stop and start the account watcher on App Suspend/Resume events. Instead, starting and starting the watcher is handled by the API itself.

Stop() Stop() Stop() Stop()

Stops the account watcher.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : void Stop()
public void Stop()
Public Function Stop() As void
mobileBroadbandAccountWatcher.stop();
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

You can begin the process of stopping a MobileBroadbandAccountWatcher by calling the Stop method. When the MobileBroadbandAccountWatcher fully stops, the Stopped event is raised. When the MobileBroadbandAccountWatcher has been stopped, it no longer raises account-related events.

You can query the status of a watcher using the Status property to determine if the watcher was aborted due to an unexpected internal error condition.

Note that you do not need to explicitly stop and start the account watcher on App Suspend/Resume events. Instead, starting and starting the watcher is handled by the API itself.

Events

AccountAdded AccountAdded AccountAdded AccountAdded

Occurs when a Mobile Broadband Account is added to the client.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : event TypedEventHandler AccountAdded<MobileBroadbandAccountWatcher, MobileBroadbandAccountEventArgs>
public event TypedEventHandler AccountAdded<MobileBroadbandAccountWatcher, MobileBroadbandAccountEventArgs>
Public Event TypedEventHandler AccountAdded( Of ( Of MobileBroadbandAccountWatcher ), ( Of MobileBroadbandAccountEventArgs ))
function onAccountAdded(eventArgs){/* Your code */}


mobileBroadbandAccountWatcher.addEventListener("accountAdded", onAccountAdded);
mobileBroadbandAccountWatcher.removeEventListener("accountAdded", onAccountAdded);
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

The network account id of the account is available in the event handler from the NetworkAccountId property.

AccountRemoved AccountRemoved AccountRemoved AccountRemoved

Occurs when a Mobile Broadband Account is removed from the client.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : event TypedEventHandler AccountRemoved<MobileBroadbandAccountWatcher, MobileBroadbandAccountEventArgs>
public event TypedEventHandler AccountRemoved<MobileBroadbandAccountWatcher, MobileBroadbandAccountEventArgs>
Public Event TypedEventHandler AccountRemoved( Of ( Of MobileBroadbandAccountWatcher ), ( Of MobileBroadbandAccountEventArgs ))
function onAccountRemoved(eventArgs){/* Your code */}


mobileBroadbandAccountWatcher.addEventListener("accountRemoved", onAccountRemoved);
mobileBroadbandAccountWatcher.removeEventListener("accountRemoved", onAccountRemoved);
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

The network account id of the account is available in the event handler from the NetworkAccountId property.

AccountUpdated AccountUpdated AccountUpdated AccountUpdated

Occurs when a Mobile Broadband Account is updated on the client.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : event TypedEventHandler AccountUpdated<MobileBroadbandAccountWatcher, MobileBroadbandAccountUpdatedEventArgs>
public event TypedEventHandler AccountUpdated<MobileBroadbandAccountWatcher, MobileBroadbandAccountUpdatedEventArgs>
Public Event TypedEventHandler AccountUpdated( Of ( Of MobileBroadbandAccountWatcher ), ( Of MobileBroadbandAccountUpdatedEventArgs ))
function onAccountUpdated(eventArgs){/* Your code */}


mobileBroadbandAccountWatcher.addEventListener("accountUpdated", onAccountUpdated);
mobileBroadbandAccountWatcher.removeEventListener("accountUpdated", onAccountUpdated);
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

The network account id of the account is available in the event handler from the NetworkAccountId property.

The AccountUpdated event is triggered when any of the following properties change:

EnumerationCompleted EnumerationCompleted EnumerationCompleted EnumerationCompleted

Occurs when the account watcher has finished enumerating accounts for the client.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : event TypedEventHandler EnumerationCompleted<MobileBroadbandAccountWatcher, object>
public event TypedEventHandler EnumerationCompleted<MobileBroadbandAccountWatcher, object>
Public Event TypedEventHandler EnumerationCompleted( Of ( Of MobileBroadbandAccountWatcher ), ( Of object ))
function onEnumerationCompleted(eventArgs){/* Your code */}


mobileBroadbandAccountWatcher.addEventListener("enumerationCompleted", onEnumerationCompleted);
mobileBroadbandAccountWatcher.removeEventListener("enumerationCompleted", onEnumerationCompleted);
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

When the watcher is started, it enumerates all existing accounts (raising an AccountAdded event for each account). You can use the EnumerationCompleted event to determine when the enumeration operation has finished. After that, all proceeding events are new.

Stopped Stopped Stopped Stopped

Occurs when the MobileBroadbandAccountWatcher has stopped.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : event TypedEventHandler Stopped<MobileBroadbandAccountWatcher, object>
public event TypedEventHandler Stopped<MobileBroadbandAccountWatcher, object>
Public Event TypedEventHandler Stopped( Of ( Of MobileBroadbandAccountWatcher ), ( Of object ))
function onStopped(eventArgs){/* Your code */}


mobileBroadbandAccountWatcher.addEventListener("stopped", onStopped);
mobileBroadbandAccountWatcher.removeEventListener("stopped", onStopped);
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

You can begin the process of stopping a MobileBroadbandAccountWatcher by calling the Stop method. When the MobileBroadbandAccountWatcher fully stops, the Stopped event is raised.

You can query the status of a watcher using the Status property to determine if the watcher was aborted due to an unexpected internal error condition.