Reputation: 6605
I realize there are plenty of barcode scanning apps and bluetooth scanners, but I am wondering if the following exists for iOS. Let's say I'm completing a plain ol' form on a website. Normally when I tap on an input the keyboard will appear like this:
However, needing a barcode scanner, I thought it would be useful if you could tap the "change keyboard" button and have "Scanner" be one of the options listed along with English (US), Emoji, etc. This would pull up an interface something like the following:
Has anyone seen anything like this or know if it's possible create this functionality? Or is there a better implementation? Basically, I don't want another piece of hardware, and I want this scanner to be available to any app (such as a browser).
Upvotes: 8
Views: 18736
Reputation: 3331
I think the app ScanKey is providing the functionality you are looking for: https://itunes.apple.com/us/app/scankey-qr-barcode-keyboard/id1356206918
Upvotes: 5
Reputation: 1
Infinite peripherals has an add-on that provides a scanboard keyboard which has a key to scan barcode using webcam.
Upvotes: -1
Reputation: 385840
You cannot do this using the built-in change keyboard button. There is no public API for accessing that button.
If you're really just displaying a web form in a UIWebView
, there's really not much you can do at all using the public APIs, I think.
If you build the form using views instead, you can get pretty close with some work. What you can do is use set the inputAccessoryView
of your text fields to a toolbar that has a button for switching to/from the bar code reader. When the user turns on the bar code reader, set the text field's inputView
to your bar code reader view. When the user turns off the bar code reader, set the inputView
back to nil
.
You might be able to make that work for text fields in a UIWebView
too, by digging around in the web view's private view hierarchy and whatnot, but you will definitely be relying on implementation details that can change in every release.
Upvotes: 1