Plugin.NFC icon indicating copy to clipboard operation
Plugin.NFC copied to clipboard

Xamarin forms NFC.Plugin problem reading tag

Open IvesBertoli opened this issue 3 years ago • 9 comments

Description

I developing app using Xamarin Forms and need read NFC card to identify peoples and machines. So, starting ready the app not return data, return empty data and flag IsSupported is false.

Steps to Reproduce

  1. Start read tag
  2. Return message empty (print)

Expected Behavior

Return data writed

  • Version with issue: 0.1.21

  • Last known good version:

  • IDE: VS Mac

  • Platform Target Frameworks:

    • Android: 11
  • Nuget Packages: Plugin.NFC

  • Affected Devices: All 186217-captura-de-tela-2022-03-23-as-172632

Reproduction Link

OBS: Your sample in Git are error too

OBS2: The smartphone working fine becouse was tested read with another app and work!

IvesBertoli avatar Mar 24 '22 16:03 IvesBertoli

@IvesBertoli what is OBS and OBS2?

saamerm avatar Mar 24 '22 16:03 saamerm

Extra Information (Observation)

IvesBertoli avatar Mar 24 '22 16:03 IvesBertoli

@IvesBertoli what kind of tag are you using and did you see the application output? "IsSupported" is false, so place some breakpoints and share the steps to see why it is false

saamerm avatar Mar 24 '22 18:03 saamerm

this screenshot is result of another android app (https://play.google.com/store/apps/details?id=com.ssaurel.nfcreader).

WhatsApp Image 2022-03-24 at 16 28 20

IvesBertoli avatar Mar 24 '22 19:03 IvesBertoli

@saamerm, can you help?

IvesBertoli avatar Mar 25 '22 19:03 IvesBertoli

@IvesBertoli I dont have the nfc tags that you are using unfortunately so I can't tell why you are facing this issue since our tags works fine for us.

As I asked before, when you were debugging: did you see the application output? "IsSupported" is false, so place some breakpoints and could share what is the reason that it is returning false?

saamerm avatar Mar 25 '22 19:03 saamerm

I was having the same issue, after format the tag with NDEF format with another app (https://play.google.com/store/apps/details?id=com.manjul.utility.nfc.writer&hl=pt_BR&gl=US) it starts working. Is there a way to add a method for this ?

Example method in Android: https://developer.android.com/reference/android/nfc/tech/NdefFormatable?authuser=2

dev-vinicius avatar Mar 28 '22 15:03 dev-vinicius

@dev-vinicius I dont have NFC tags of that type in order to test it, did you want to submit a PR with that functionality?

saamerm avatar Apr 06 '22 16:04 saamerm

https://github.com/franckbour/Plugin.NFC/pull/102 - Its working with Mifare Classic

dev-vinicius avatar Apr 07 '22 01:04 dev-vinicius