问题
I need to do peer to peer connection between two nfc enabled device, i need some tutorial to do it if anyone done it send me link or explain.
回答1:
That sample is old and uses deprecated APIs (which are still needed though to support GB). Please look at this one instead if you are working with ICS:
http://developer.android.com/resources/samples/AndroidBeamDemo/index.html
And check out the docs here:
http://developer.android.com/guide/topics/nfc/nfc.html#p2p
Basically, what you need to do is create an app that creates the NDEF message, registers the message to be pushed, and also creates an intent filter in the android manifest to also filter for the intent that is created when the application pushes the ndef message.
When to devices come in contact (with the application installed), one device will push the data onto the other. The other device has an intent filter that correctly filters for the message and handles it.
That's the basic mechanics of it. Check out the Android beam demo for more info.
回答2:
Did you look at http://developer.android.com/resources/samples/NFCDemo/index.html It contains the tutorials you are looking for
来源:https://stackoverflow.com/questions/7803373/how-to-do-nfc-peer-to-peer-connection-in-android