Know when network connectivity changes

Updated: August 27, 2013

Applies To: Windows 8, Windows 8.1

To know when network connectivity changes, use the AccountUpdated event of MobileBroadbandAccountWatcher:

  1. Instantiate a MobileBroadbandAccountWatcher object.

  2. Add an AccountUpdated event handler.

  3. Invoke Start() on the watcher.

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

  5. If the network has changed, query the CurrentNetwork property for the current network object.

See Also

Show:
© 2014 Microsoft