micjahn / ZXing.Net

.Net port of the original java-based barcode reader and generator library zxing
Apache License 2.0
2.7k stars 667 forks source link

Renderer for net8.0-android? #541

Closed MihaMarkic closed 8 months ago

MihaMarkic commented 9 months ago

How can I use a renderer that targets TargetFramework net8.0-android? I see there it only mono/xamarin renderer out there that probably isn't what I should use. So, do I need (at least for the time being) port ZXing.Net.Bindings.Android to net8.0-android and then use it? If so and if it works, I could also create a pull request with these new bindings.

micjahn commented 9 months ago

In my opinion the package ZXing.Net.Bindings.Android should be extended with a new target framework. Feel free to provide a pull request. I would appreciate it.

MihaMarkic commented 9 months ago

Yep, that would work as well. I've quickly ported it to .net8.0-android and it works. I'll try to merge it with existing project and provide multiple target frameworks. Besides, do you mind if I remove extern aliases are they are not easy to work with in .NET core?

micjahn commented 9 months ago

You can try to remove the extern alias. But I think I added it because of namespace collisions between Android.... and ZXing.Android....

MihaMarkic commented 8 months ago

Looking more into it, it seems that even as it is, it is compatible with .net 6+-android. At least that is what Nuget.org says and from what info I was able to gather. Furthermore I'm not even sure how to target monodroid from a .net project. I guess the issue can be closed, at least for the time being.