Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove reference to Xamarin.Android.Support.Compat #339

Closed
vividos opened this issue Dec 7, 2020 · 1 comment
Closed

Remove reference to Xamarin.Android.Support.Compat #339

vividos opened this issue Dec 7, 2020 · 1 comment

Comments

@vividos
Copy link

vividos commented Dec 7, 2020

I recently checked my Xamarin.Forms projects for indirect dependencies and found out that it still referenced Xamarin.Android.Support.Compat somewhere. Investigating showed that it came from the Xam.Plugin.Geolocator NuGet package. It's the last old-school plugin that I'm using, as I could migrate most of it to Xamarin.Essentials. Further investigating showed that this plugin references Plugin.Permissions, which has the Xamarin.Android.Support.Compat NuGet package. All other projects and package references in my project is already using AndroidX.

So there are a few ways out of this dependency, in my favorite order:

  1. Xamarin.Essentials implements foreground listening to location changes: [Spec] Listening for location changes in the foreground xamarin/Essentials#1447 (the Spec is from me, but I didn't work on the code yet). Foreground listening to location changes is the reason why I'm using this plugin for.

  2. This plugin would get rid of Plugin.Permissions and start using Xamarin.Essentials for permission checking. The Plugin.Permissions 5.0.0-beta already includes Essentials, so why not here, too.

  3. The Plugin.Permissions plugin would get rid of the Xamarin.Android.Support.Compat package and adapt to using AndroidX. For this I would create a separate issue, if necessary and desired.

James, what path do you think I should proceed with?

Bug Information

Version Number of Plugin: 4.5.0.6
Device Tested On: Pixel 3a
Simulator Tested On: -
Version of VS: 16.8.2
Version of Xamarin: Xamarin.Android 11.1.0.17
Versions of other things you are using: -

@vividos
Copy link
Author

vividos commented Jul 14, 2021

I found a way to fix including the old Xamarin.Android.Support packages: I still reference Xam.Plugin.Geolocator version 4.5.0.6, but it has a dependency of Plugin.Permissions version >= 3.0.0.12, but I can manually add Plugin.Permissions in version 6.0.1, which uses the newer AndroidX packages. So this is a workaround for me, closing this issue.

@vividos vividos closed this as completed Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant