Skip to content

FX300 Imager (Android 4.4)

From image FX300_v1.11.0 and above

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 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 button
    • KeyEvent.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.

For images between FX300_v1.1.0 and FX300_v1.8.0

In the previous version of the Famoco OS image, the barcode was not natively integrated. However, you could still build your own application to trigger and use the scanner. To achieve this, find below the requirements:

  • Place the specific SDK for FX300 in the app/libs folder of your Android project.
  • Put the permissions below in the AndroidManifest.xml file:
    • <uses-permission android:name="android.permission.CAMERA" />
  • The side buttons are accessible with the following key codes:
    • KeyEvent.KEYCODE_F2 = upper left side physical button
    • KeyEvent.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 through the MDM or ADB.


More

  • Please find here the necessary javadoc to help you to understand how the Scanner API works.

  • Please find here the documentation to help you to understand how to configure the scanner depending on your needs.