Receive notification for device information account changes
To receive a notification for device information account changes, use the AccountUpdated event of MobileBroadbandAccountWatcher as described here:
Instantiate a MobileBroadbandAccountWatcher object.
Add an AccountUpdated event handler.
Invoke Start on the watcher.
Query the HasDeviceInformationChanged property of the MobileBroadbandAccountUpdatedEventArgs object in the AccountUpdated event handler.
If the device information has changed, query the account CurrentDeviceInformation.TelephoneNumbers property for the telephone number.
For example:
if (account.currentDeviceInformation.TelephoneNumbers.length > 0) { // there is now at least one telephone number }
Related topics
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for