Basti909851
Basti909851

Reputation: 127

Reading a Tag with the NFC-enabled Androidphone

The API demo is not understandable for me. I have bought A Milfare 1K Labels-Tag, works great with the well known "NFC TagWrite" App.

So I want to implement this into my own app. I do not need to write content to tags, but read it. I know there must be a decleration in my Manifest (with MIME-Type) in order to tell my app to come app, whenever a specific tag type has been touched to the phone. I do know there must be a kind of Nfc-Record to make a specific Ndef Message.

How can this be done? I have my activity, which should be come a, whenever a tag with typ "XYZ" has been touched to the phone. It should simply show plain-text, nothing else. On the screen, the content should appear in a simple TextView (id=tagContent).

What do I have to do?

Upvotes: 2

Views: 677

Answers (2)

Eran Tal
Eran Tal

Reputation: 187

I think you should try authenticating with mfc.authenticateSectorWithKeyB instead of the 'A' in the sample. it worked for me.

Upvotes: 0

Albin
Albin

Reputation: 4220

There are bunch of things that needs to be in place to do this. Luckily, everything is described in the following post:

http://mifareclassicdetectiononandroid.blogspot.com/2011/04/reading-mifare-classic-1k-from-android.html

Good luck!

Upvotes: 0

Related Questions