问题
I am a student, working on a Master's project. I want to create an app using NFC P2P.
I am trying to emulate P2P mode on android sdk on Windows. I followed the steps provided in Open NFC Compilation quick HOWTO on the Android edition page (http://open-nfc.org/wp/editions/android/). I configured the two devices and enabled NFC using IP as 10. 0.2.2. I used the simulator and connection center to link up two open nfc virtual devices(API 10) in p2p mode but was not successful.
Please let me know if you have tried this and were successful.
回答1:
I had the same problem.
I experimented with the simulator and successfully exchanged tags with the standard tag app. I use the 4.3.3 gingerbird addon and 4.3.3 core edition.
Order:
- Start the connection center in administration mode.
- Start the NFC simulator.
- Start the Open-NFC 4.3.3 Virtual Device (= #1)
- Start the Open-NFC 4.3.3 Virtual Device (= #2)
- Enable NFC on both devices.
- Start the app with the ForegroundNdefPush on one device. (With the standard app "Tags" you can share a tag for testing.)
- Enable in the NFC simulator the NFC Device #2.
- Double-click on the NFC Device #2 in the NFC simulator to disable the device.
- The NFC Tag is successfully exchanged.
I think this is because you have to pull the devices together and away.
My problem is that the NFC simulator crashs after one or several tag exchanges. Maybe it's because the 64 bit windows.
Regards
来源:https://stackoverflow.com/questions/9405601/p2p-in-android-using-open-nfc-virtual-device