Search code examples
androidnfcandroid-beam

Testing NFC or Beam using one device?


I'm playing around with Beam and NFC but I only own one android device, is it possible to simulate or test the transmission with just one physical device?


Solution

  • You can theoretically do this by building an intent that a scanned tag would create and starting an activity with that intent. You would basically encapsulate the payload inside of an extra in the NDEF_DISCOVERED intent and try to start an activity with the intent. Check out this sample tag canon app.

    http://www.java2s.com/Open-Source/Android/android-platform-apps/Tag/com/android/apps/tagcanon/TagCanon.java.htm