1

I'm developing a web app where I want to retrieve users by their RFID tags. I have a form where I input the RFID tag ID in a text field.
It is already working on desktop using an usb RFID reader that acts as an HID device.

But is it possible to do the same on an Android phone with built-in NFC/RFID reader?

I can read the tag's content using a dedicated app on my phone, but is there an app that reads RFID tags and behaves like a keyboard? Or maybe a dedicated Android keyboard that offers this functionality?

Any advice will be appreciated. Thank you!

EDIT

For anyone wondering, I ended up creating a new Android IME from this source and adding a custom button. When pressed, a new intent is launched in which I listen for any RFID/NFC tag event. Then I read and value and return it to the IME using the clipboard. Probably not the best solution but it works as expected.

thomas.drbg
  • 1,068
  • 10
  • 9
  • Please share more info: Which RFID tag ? Is tag read on Android device with app from store as NFCTagInfo ? – LaurentY Mar 03 '15 at 13:14
  • Thanks for your comment. I use Mifare Classic and NXP NTAG203 tags. On desktop I use a cheap USB reader that inputs the tag UID like a keyboard. Both tags are recognized on my phone with NFCTagInfo. – thomas.drbg Mar 03 '15 at 14:06

1 Answers1

1

When a NFC tag is tap on Android device, android send tag to registered application. In your application you have to register for this tag as explained here.

Once your application get tag, when you have to read content. After you do what you want with content, for instance you could fill a field or content could be send to a webview where your website is shown.

Please have a look at this anwser, it explain how to communicate between a Activity and a WebView: Passing data from java class to Web View html

Community
  • 1
  • 1
LaurentY
  • 7,495
  • 3
  • 37
  • 55
  • Ok so you suggest I should make a an app that contains this tag functionality and a web view. I have little experience about Android development, but do you think it's possible to develop a new input method service (a keyboard) that could read tags and "type" the ID in my field? I already use a special keyboard to read barcodes, but I couldn't find anything similar to read tags. Thanks – thomas.drbg Mar 04 '15 at 05:34
  • @ThomasDrbg I don't understand why you want to create a new input method. It seems to be a very very difficult way for just a very easy thing to do. In Android, an app could communicate with a WebView. I update my answer. – LaurentY Mar 04 '15 at 08:50
  • You are right, I think I'll go this way. I just thought it would be easier to access my app with a browser and have a specific input method to fill this text input that needs the bracelet RFID value. It seems that input methods can't get the NFC intent because it needs to be an foreground activity, so it's impossible anyway. Thank you – thomas.drbg Mar 05 '15 at 11:14