Search code examples
iosipadbarcode-scanner

how to launch an ipad app when a text box is selected


Ideally what I'd like to do is add a shortcut to the iPad keyboard that launches another program and in my case a scanning application.

We'd like to utilize the iPad camera as a scanner and whenever we tap a text input box in any third party application, have the ability to launch the scanner software, scan the code and place the scanned data into the text box.

I've read about the scanning libraries and using actual barcode scanners, but I haven't seen anything that would allow you to create this type of shortcut.

Any thoughts or suggestions on where I may find more information?


Solution

  • tl;dr: It is not possible.

    Answer

    The iPhone keyboard is cannot be modified system-wide or replaced. See the 4th question on the Fleksy FAQ
    As you mentioned, your options are:

    1. using a scanning library
    2. using a barcode scanner

    Scanning Library

    If you don't have access to the application source or can't convince the developer to add scanner support, your only option here would be to use a stand alone scanner app, switching between apps to copy-paste the scanned data into the text field.

    Pros

    • Free (ZXing, zbar, etc)

    Cons

    • Slow. The camera scanner takes about a second, plus the time it takes to switch apps and copy paste. You are looking at ~10 seconds

    Barcode Scanner

    It is possible to integrate a barcode scanner into an app using the provided SDK and that is advisable for most applications, but a lot of scanners also support HID mode. In HID mode, the scanner connects to iOS (or Android) as a keyboard and can "type" into the active input field.

    Pros

    • Fast, very fast
    • Use in HID mode to scan data directly into text input without modifications to the app

    Cons

    • Expensive

    Disclaimer I work for Socket Mobile. Socket Mobile makes beautiful bluetooth barcode scanners.