xamarin / Essentials

Xamarin.Essentials is no longer supported. Migrate your apps to .NET MAUI, which includes Maui.Essentials.
https://aka.ms/xamarin-upgrade
Other
1.53k stars 506 forks source link

Remove wrong Connectivity dispose calls on Android #2091

Closed jfversluis closed 1 year ago

jfversluis commented 1 year ago

Fixes #1996

Closes #1997

jfversluis commented 1 year ago

@borrrden @cpraehaus if this is still relevant, would you be able to get the NuGet from this PR and try if that resolves your issues?

borrrden commented 1 year ago

Let me reach out to our user who was having the problem.

cpraehaus commented 1 year ago

@jfversluis Thanks for the fix. Yes, I will try to re-produce the issue again and then test the fix in this PR.

cpraehaus commented 1 year ago

@jfversluis I tested v1.8.0-pr.2091.1 and can confirm that for our case the problem is fixed: no exception is thrown anymore.

Android ConnectivityManager still complains about the missing callback but I think this is OK in this case since the callback was scheduled by the system but in the meantime deregistered/removed by the application:

[ConnectivityManager.CallbackHandler] callback not found for CALLBACK_AVAILABLE message
jfversluis commented 1 year ago

Thanks @cpraehaus