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 Windows Store 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 : IMobileBroadbandAccountWatcherpublic sealed class MobileBroadbandAccountWatcher : IMobileBroadbandAccountWatcherPublic NotInheritable Class MobileBroadbandAccountWatcher Implements IMobileBroadbandAccountWatcher// You can use this class in JavaScript.
- Attributes
| 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)
|
Constructors
MobileBroadbandAccountWatcher() MobileBroadbandAccountWatcher() MobileBroadbandAccountWatcher() MobileBroadbandAccountWatcher()
Creates a new instance of a MobileBroadbandAccountWatcher.
Note
This functionality is only available to mobile operator apps and Windows Store 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()// You can use this method in JavaScript.
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 Windows Store 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// You can use this property in JavaScript.
- Value
- MobileBroadbandAccountWatcherStatus MobileBroadbandAccountWatcherStatus MobileBroadbandAccountWatcherStatus MobileBroadbandAccountWatcherStatus
The status of the account watcher.
Methods
Start() Start() Start() Start()
Starts the account watcher.
Note
This functionality is only available to mobile operator apps and Windows Store 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// You can use this method in JavaScript.
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 Windows Store 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// You can use this method in JavaScript.
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 Windows Store 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 AccountAdded<MobileBroadbandAccountWatcher, MobileBroadbandAccountEventArgs>// You can use this event in JavaScript.
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 Windows Store 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 AccountRemoved<MobileBroadbandAccountWatcher, MobileBroadbandAccountEventArgs>// You can use this event in JavaScript.
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 Windows Store 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 AccountUpdated<MobileBroadbandAccountWatcher, MobileBroadbandAccountUpdatedEventArgs>// You can use this event in JavaScript.
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 Windows Store 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 EnumerationCompleted<MobileBroadbandAccountWatcher, object>// You can use this event in JavaScript.
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 Windows Store 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 Stopped<MobileBroadbandAccountWatcher, object>// You can use this event in JavaScript.
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.