Emulate the datawedge but for NFC

// Expert user has replied.
d david Mac Randal 3 years ago
142 3 0

I am trying to emulate some of the datawedge functionality for the NFC scanner on a TC70.
The main issue I have is that I am unable to simulate key presses in another app.
I want the user to press a hardware button that will trigger the NFC read (I have the code to do this) and then type the result into the active window.
So far I have found that a service cannot listen for a key press so my next thought was to have an app start on the button press and start the service. This app would then close leaving the original app active which the service could then type into.
I can get a service to type into my app window but when my app is closed the service does not type into the active window.
 
Any help would be greatly appreciated.
 
Thank you

Please register or login to post a reply

3 Replies

K Kjell Lloyd

Can't you create a custom Android keyboard that listen for NFC broadcast and from the keyboard inject data?

V Vedsatx Saddvv

David, in your description, would "active window" be any third party application, or is this an app you have source code for?  My suggestion would be to send an intent with the gathered data.  In the "Active window" app, register a broadcast receiver to get the data and place it in the proper field.  

d david Mac Randal

The active window would be any third party application. The one we are using is called wavelink however I am testing with just a standard third party notepad. I do not have access to the source for the third party software so cannot set up the broadcast reciever.

Thanks.

CONTACT
Can’t find what you’re looking for?