FX300,2 Imager (Android 6)
The Famoco FX300,2 device has a built-in 2D scanner.
Native Behavior
You can actually use the scanner out of the box:
- In order to use the scanner on the devices, you only have to press and hold one of the side upper buttons.
- The device will stop scanning when either a barcode is scanned, or the button is released.
- This is possible thanks to the Laser Scanner service running in background in the OS.
- To give an example of what is achievable, you could read a barcode directly in an input text field. The value of the scanned barcode will then be placed in the selected text field.
- You could specify the wanted behavior after that a barcode is scanned in:
Settings > Laser Scanner > Post scan action
:- None : don't do anything
- Next : goes to the next field
- Line : inject a next line end (selected by default)
Custom Behavior
You could also design a specific behavior for the scanner and develop you own application to:
- Bind the physical buttons to trigger the scanner
- Design the scanner behavior in the code To achieve this, find below the requirements:
- Place the specific SDK for the FX300,2 in the app/libs folder of your Android project
- Put the right permissions in the AndroidManifest.xml file:
<uses-permission android:name="android.permission.BARCODE_SCANNER" />
<uses-permission android:name="android.permission.CAMERA" />
- Disable the Laser Scanner Service on the device in `Settings > Laser Scanner (Unfortunately, this action is not yet possible through the MDM, but it will be improved soon).
- The side buttons are accessible with the following key codes:
KeyEvent.KEYCODE_F2
= upper left side physical buttonKeyEvent.KEYCODE_F1
= upper right side physical button
- Load the libraries with the code below in your activity:
static { try { System.loadLibrary("IAL"); System.loadLibrary("SDL"); System.loadLibrary("barcodereader44"); // from Android 4.4 Log.i(TAG, "Barcode scanner drivers loaded"); } catch (Exception e) { Log.e(TAG, "static initialization block", e); } }
Demo application
Please find here a sample application which will help you to build you own custom application.
Please find here the same application compiled that you can directly install on a Fx300,2 through the MDM or ADB.