iOS and Bluetooth HID barcode scanner
Asked Answered
C

0

6

I have iOS device and Bluetooth barcode scanner, which works as external keyboard.

The task is to get scanned barcode in background mode inside my dynamic library and notify application, which includes my library. All UI stuff is on main app, I cannot insert my code in it, all I have is virtually independent library.

As I think, few approaches might exist:

  1. Connect BT scanner by myself and read barcode directly from device. I tried to use ExternalAccessory, but EAAccessoryManager doesn’t see device. Also there is such stuff as CoreBluetooth for BLE, but scanner supports only BT 2.0;
  2. Somehow grab HID device and exclusively read data from it. I found info about IOHIDFamily, but it’s private API, and cannot be used because of AppStore requirements;
  3. Create some keyboard hook. Catch all keyboard events, filter barcode readings and just pass through usual keyboard input.

But for now I cannot realize any of my ideas. Maybe someone can help me to do it or suggest any other approach?

Thank you.

Circumfuse answered 3/10, 2016 at 15:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.