Android Question Read data from another application service ?

vdudukov

Member
Licensed User
Longtime User
Hello!

I have a POS android with integrate barcode scanner. It has preinstalled barcode app with BARCODE SERVICE in the background. Every time when I press trigger (hardware button), I turn barcode scanner ON.

Now i found solution to turn on barcode scanner with button in my app with this function

Broadcast.sendBroadcast("com.hampoo.barcodescanner")

And now i want to receive scanned barcode. Is it possible ?

This is log from Eclipse LogCat.

From this text i found solution to turn scanner on with software button

08-27 01:58:54.205: E/(544): gomtel sendBroadcast com.hampoo.barcodescanner


But, is it possible to receive barcode from this LogCat text.

08-27 01:58:54.591: E/(10588): gomtel BarcodeScannerService onReceive mResult = 8606004250179


Thanks.
 

vdudukov

Member
Licensed User
Longtime User
Well its complicated.

This integrated barcode application always working in the background with service. When I press hardware button on the left side of device, i turn on barcode scanner, and i can read barcode. Then this service in the background sends this result.

LogCat define this trigger key like KEYCODE_VOLUME_DOWN, but when I create function to detect key, no respond.

Sub Activity_KeyPress (key As Int) As Boolean
log(key)
End Sub
 
Last edited:
Upvote 0
Top