- A
android
test app to validate native module logic that communicates with Socket Mobile Barcode scanners. - I have been testing this with the
Socket Mobile S740
scanner. - To use this app with a scanner you will to run it on a
real device
. - This App/Native Module is
NOT IOS READY
. - This app also uses embedded capture library so that it does not need to use the companion service app.
- The keys used to configure the Capture Client are app/developer specific.
- App keys are defined here.
- Modify these and call CaptureClientProvider.initializeCapture(...) in your MainApplication.java
onCreate()
method. - This will configure a singleton of the CaptureClient for the native module to use.
- Make sure you have properly set up your environment for React Native / Android
- Docs fo this can be found here
- Clone repo locally
- run
yarn install
yarn android
- If this does not prompt you to open a new terminal window with a metro server running, create a new terminal window and run...
yarn start
- then in another window run
yarn android
- This Module does
NOT
handle forming the bluetooth bond with the scanner. - To achieve this I wrote another custom Bluetooth Native Module which has a typescript facing API that can be found here
- You are more likely to use the useBluetoothDiscovery hook to discover devices and the useBluetoothPairing hook to form a bond.
- A complete pairing flow with examples of how to form the bluetooth bond, grant permissions, and test scanner features can be found here
- This is the pairing flow that will launch when you run the app.