Android Question How to send text data from background service to a running app like a keyboard wedge.

rasaliad

Member
Licensed User
Longtime User
Hi!!!

I'm back to B4A, and my first app i need to do develop is a service in background that read RFID Tag and send the tag value to Windows Application that is running into a remote desktop application. Let me explain.

I Have an Intermec IP30 RFID Reader and a Intermec CN51 Handeld with Android 4.2.2.

I Use the SerialExample Demo and connect to the RFDI Reader via bluetooth and it work Ok, and read the RFID Tag. Now my problem is that i need to convert it to a service in background (ok i will do it reading the tutorials), and when the RFID read a tag, the service need to send the Tag Code to foreground Application that is a third party app (Remote Desktop App) running a windows app that is waiting in a Textbox for the Tag Code.

I have seen videos where they install a bluetooth scanner to android device and put it in input type keyboard wedge, then go to browser for example and then read a barcode and the information scanned go directly to the google search box. How can i do that in my case, using B4A, with the service app in background?, Note that i do not have the source code for the Remote Desktop App (this is an unknown app for me, like the browser for example).

In resume, how to do in B4A that background services read a RFID Tag an send then scanned information to a unknown foreground running app.

Thanks in advanced!!!

Rafael Liriano
 

rasaliad

Member
Licensed User
Longtime User
You cannot send text to another app unless this app explicitly provides an API for that.

However why don't you create a small B4J app for the PC and send the text to the B4J app directly?

Hi Erel, thanks for your answer, but my problem is that the windows app, can't be changed for now, this app is running at a remote server, and executing from the SmartPhone via a remote desktop application. I saw some app video demo, where they install a bluetooth barcode scanner reader and setup it to use keyboard wedge as input, then run another app, for example google chrome, and then when scan a barcode with the bluetooth device, the barcode information is injected as virtual keystrokes into (virtual keyboard wedge) the search box, or for example to a spreadsheet cell in case is a spreadsheet app. I hope you understand my question.

Thanks for you help.

Rafael Liriano
 
Upvote 0
Top