NFC plugin or library for .NET Maui Android?

Will 0 Reputation points
2023-11-03T19:14:39.99+00:00

I've tried all or most of the proposed solutions on the web to try and to get NFC to work in .NET Maui, and it is such a pain.

The app that I need to build is not big, a login page, a barcode scanner page, and then an NFC page.

I have the first 2 working with no issues, but when I navigate to the NFC page from the scan barcode page, for some reason it won't pick up the RFID tag, but if I run the page by itself it picks it up no problem.

I'm using BarcodeScanner.Mobile.Maui to read my barcodes, and have Plugin.NFC to read the RFID tags. The barcodes have a number which is then passed to the NFC page, I would like to write the barcode # to the tag, and then want to save it in the DB.

If I use a clicked event from a button, and navigate to the NFC page, I can read the RFID tag, though if I use my scan barcode page, it then triggers the Camera_OnDetected event which then navigates to the NFC page, then trying to read the NFC tag doesn't work, and I have not modified any code.

To navigate I use 'await Navigation.PushModalAsync(new NfcReaderView());'.

I would think that with NFC being used quite frequently, not sure why MS doesn't have its own NFC library for .NET Maui.

It's Friday and my brain is full, any insight would be much appreciated.

Thanks

Tools

VS 2022 .NET Maui

Samsung S10 phone being used to test against

Plugin.NFC

BarcodeScanner.Mobile.Maui

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,011 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alessandro Caliaro 4,181 Reputation points
    2023-11-03T21:35:37.6+00:00