Reputation: 41
Developing application on Delphi Tokyo, device Lanchang U8000S (http://www.itlecom.com/ProductsDetails.asp?id=1) when creating form I use:
VKAutoShowMode := TVKAutoShowMode.never;
for disabling show virtual keyboard when enter in example TEdit component and other input components, because in application lot of inputs is possible enter with bar-code scanner or hardware numpad keyboard. The scanner configuration I set to Keyboard emulation mode and after scan emulate Enter press.
http://www.lckj.cn/Upload/U8000S_Scan_API.pdf
I use:
setOutScanMode(1);//keyboard emulation
setScanCodeEnterKey(true);// Additional enter key after the scan results.
The problem is if you start application, and put cursor and focus in one TEdit
component and scan barcode, nothing you get empty result, with enter key, but if you call virtual keyboard and simple close it after open, then scanner works fine and you get results! And in same time when scanner is not giving data, the numpad keyboard on device work fine. But then you work in application changing focuses and then get again in some edit, again input from scanner not work.
Looks like if you not use VKAutoShowMode := TVKAutoShowMode.never;
then everything work fine, but I cant use this option because I have lot of forms where is no place to show virtual keyboard, and however why show virtual keyboard if you dont`t need it!!!
Looks there is another option:
setOutScanMode(0) // Broadcast output mode.
But I have no idea how to work with this mode because I don`t now where catch these scanned data!?
I hope someone have some idea how solve this problem!?
Upvotes: 4
Views: 3518
Reputation: 687
If you're using an Android based barcode scanner, I have found that the best way of receiving scans is to us "Intents". There are sample applications in the Delphi example, usually installed at C:\Users\Public\Documents\Embarcadero\Studio\20.0\Samples\Object Pascal\Mobile Snippets\AndroidIntents. Brian Long has several articles and videos on using intents with Android. He also points out some issues with these (and fixes) in the initial Rio 10.3 release at http://www.delphifeeds.com/go/s/149394. I do not know if these have been fixed in the latest releases.
Upvotes: 0