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:

  1. Instantiate a MobileBroadbandAccountWatcher object.

  2. Add an AccountUpdated event handler.

  3. Invoke Start on the watcher.

  4. Query the HasDeviceInformationChanged property of the MobileBroadbandAccountUpdatedEventArgs object in the AccountUpdated event handler.

  5. 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
    }
    

Common tasks for mobile broadband Windows Runtime APIs