5

Here's what I'm trying to do with 2 Galaxy Nexuses running Android 4.0 with NFC capabilities:

  • Device A and B are in close enough to initiate an Android Beam UI.
  • Device A sends a beam to Device B
  • Device B received beam, does some processing, and then sends a response beam back to device A

I have the initial beam from A -> B working fine but not the communication back. I do want to send something more than just an 'ACk', like a small payload of data. Is there any way to do this over NFC with the current APIs or will I have to look towards WiFi/BT p2p communication?

NFC guy
  • 10,151
  • 3
  • 27
  • 58
dougzor
  • 463
  • 1
  • 5
  • 8

4 Answers4

1

I don't think this is possible unless you pull the devices apart then put them together again and explicitly beam data from Device B to A with the touch to beam UI. You can use NFC to initiate a BT connection though and get the job done.

robertly
  • 2,132
  • 14
  • 9
0

For now, (unfortunately) peer-to-peer mode is only accessible on Android through Android Beam, which can't be used for bi-directional communication. If you want to archieve true bi-directional communication, you can better use reader/writer & card-emulation modes. When emulate a ISO/IEC 14443-4 tag, you can use APDU commands (see ISO/IEC 7816-4) to send bi-directional information.

S.Pols
  • 3,414
  • 2
  • 21
  • 42
0

while the two devices are close to each other you can show a toast at B device to ensure it receive the NDEf message

Dania Delbani
  • 816
  • 1
  • 11
  • 27
0

I have not tried that myself, but you might be able to acheive a form of bi-directional communication by using one phone in reader/writer mode and the other phone in host based card emulation mode (HCE). See also this thread: NFC reader/writer mode - is it only for tags?.

Community
  • 1
  • 1
corvairjo
  • 843
  • 1
  • 14
  • 25