Drago Bratko Active Member Licensed User Longtime User Feb 5, 2018 #1 Inside mobile device there is HID barcode scaner integrated. I would like to read it's scanning. I know that I could put TextField and handle its TextChanged event. But, what I would like to do is to read it from any part of activity (where I have tabstrip and multiple tabs) ... something like KeyPreview ... so I could catch it. What I have found on forum is this : https://www.b4x.com/android/forum/threads/how-to-get-input-value-from-usb-hid.71857/#post-457719 but it's for B4J. Any ideas ?
Inside mobile device there is HID barcode scaner integrated. I would like to read it's scanning. I know that I could put TextField and handle its TextChanged event. But, what I would like to do is to read it from any part of activity (where I have tabstrip and multiple tabs) ... something like KeyPreview ... so I could catch it. What I have found on forum is this : https://www.b4x.com/android/forum/threads/how-to-get-input-value-from-usb-hid.71857/#post-457719 but it's for B4J. Any ideas ?
Jeffrey Cameron Well-Known Member Licensed User Longtime User Feb 5, 2018 #2 I'm not positive, but I do not think what you are trying to do is possible with the scanner in HID mode. You might try SPP mode: https://www.b4x.com/android/forum/t...bluetooth-scanner-via-spp-mode.83490/#content Upvote 0
I'm not positive, but I do not think what you are trying to do is possible with the scanner in HID mode. You might try SPP mode: https://www.b4x.com/android/forum/t...bluetooth-scanner-via-spp-mode.83490/#content
Drago Bratko Active Member Licensed User Longtime User Feb 5, 2018 #3 Thank you for your ansver. Yes, I will try to go that way ... or if not, I will put TextField. Upvote 0
KMatle Expert Licensed User Longtime User Feb 5, 2018 #4 Drago Bratko said: Thank you for your ansver. Yes, I will try to go that way ... or if not, I will put TextField. Click to expand... Nah, working with AsyncStreams is a very good method to handle Bluetooth devices. You can use it for all kind of communications later. I did a small app which is connected to a B4J app using AsyncStreams via WiFi to access a database, too. Once you get used to it, you will love it. https://www.b4x.com/android/forum/threads/b4x-network-asyncstreams-b4xserializator.72149/ I don't use the serializator, but the other parts of the example. Upvote 0
Drago Bratko said: Thank you for your ansver. Yes, I will try to go that way ... or if not, I will put TextField. Click to expand... Nah, working with AsyncStreams is a very good method to handle Bluetooth devices. You can use it for all kind of communications later. I did a small app which is connected to a B4J app using AsyncStreams via WiFi to access a database, too. Once you get used to it, you will love it. https://www.b4x.com/android/forum/threads/b4x-network-asyncstreams-b4xserializator.72149/ I don't use the serializator, but the other parts of the example.