Essentials: ConnectivityChanged event fired only once

Created on 6 Sep 2019  路  1Comment  路  Source: xamarin/Essentials

Description

For internet connectivity check,
I have used Connectivity.ConnectivityChanged += Connectivity_ConnectivityChanged; as in the example with relevant Connectivity_ConnectivityChanged function. ConnectivityChanged event only gets fired once, from when I Connect -> Disconnect. When I reconnect back, the event doesn't get fired. Any idea why?

Steps to Reproduce

  1. Run sample application of Xamarin.Essentials: Connectivity or Reachability sample
  2. Turn off internet connection -> event gets fired
  3. Turn on internet connection -> event doesn't fire anymore

Expected Behavior

Event should get fired when switching network from online to offline and vice versa.

Actual Behavior

ConnectivityChanged event only gets fired once

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE: VS for Mac
  • Platform Target Frameworks:

    • iOS: 12.4

  • Nuget Packages: Xamarin.Essentials: Connectivity
  • Affected Devices: iPhoneXR Simulator
bug

Most helpful comment

855 states this is a simulator issue. Test on a physical device and it should work fine.

>All comments

855 states this is a simulator issue. Test on a physical device and it should work fine.

Was this page helpful?
0 / 5 - 0 ratings