How to use a barcode scanner as a keyboard in iOS?

I understand that there are many applications for scanning barcodes and bluetooth scanners, but I'm wondering if the following exists for iOS. Let me say that I am completing a simple form on a website. Usually, when I click on the input, the keyboard will look like this:

enter image description here

However, in need of a barcode scan, I thought it would be useful if you clicked the "change keyboard" button and pointed the "Scanner" to one of the options listed along with English (USA), Emoji, etc. This pull up the interface like this:

enter image description here

Has anyone seen something like this or knew if it is possible to create this function? Or is there a better implementation? In principle, I do not want other equipment, and I want this scanner to be available for any application (for example, for a browser).

+6
source share
3 answers

I think the ScanKey app provides the functionality you are looking for: https://itunes.apple.com/us/app/scankey-qr-barcode-keyboard/id1356206918

+2
source

You cannot do this using the built-in keyboard change button. There is no public API to access this button.

If you really just show the web form in a UIWebView , I really think that in fact you cannot use the public APIs at all.

If you create a form using views, you can get closer to some work. What you can do is use the inputAccessoryView text fields on the toolbar, which has a button to switch to / from the barcode reader. When the user turns on the barcode reader, set the inputView text box to view the barcode reader. When the user turns off the barcode reader, set the inputView back to nil .

You may be able to do this job for text fields in UIWebView by digging into the hierarchy of a private view of a web view and something else, but you will definitely rely on implementation details that may change in each version.

+1
source

Endless peripherals have an add-on that provides a scanner keyboard that has a key to scan a barcode using a webcam.

-1
source

Source: https://habr.com/ru/post/958038/


All Articles