Shivdattam
Shivdattam

Reputation: 69

Creating NFC Reader application

I want to develop a NFC tag reader application. I have some knowledge about the NFC API in the Android SDK. I have even imported the NFCDemo sample app from the Android SDK sample apps. The NFCDemo app just creates fake tags and capture them. I want to recognize NFC tags when they are tapped on the back of phone. I have a Google Nexus Phone to test this.

My question is, when I tap a tag on the back of the phone, the "ACTION_TAG_DISCOVERED" intent is dispatched ... How and where this intent is to be handled? How is "ForegroundDispatch" used for the same?

Thanking in anticipation, Shivdattam.

Upvotes: 1

Views: 4089

Answers (3)

ThomasRS
ThomasRS

Reputation: 8287

I have created an Android boilerplate project you might be interested in, it seems to cover what you are looking for.

Upvotes: 0

user779554
user779554

Reputation: 185

Check TagViewer.java class in NFCDemo app (http://developer.android.com/resources/samples/NFCDemo/src/com/example/android/nfc/TagViewer.html). It will give solution for your question.

Upvotes: 2

shivdattam
shivdattam

Reputation: 3

It seems like your problem is "the Intent ACTION_TAG_DISCOVERED" is fired automatically or is to be fired by yourself after tag is touched on the back of your phone.Is it?

Upvotes: 0

Related Questions