Trigger-remapping Tutorial Tutorial

RFID SDK for Android 2.0.2.94

Applicable Devices : RFD40XX and RFD90XX

Overview

This Tutorial walk-through the steps to perform Trigger-remapping operation using RFID3 API

Create The Project

  • Start by creating a new project in Android Studio. For help, see the Android Studio tutorial.
  • Refer Hello RFID to prepare basic setup to work with RFID Reader and then follow this guide

Details

This feature applies for RFD40 and RFD90 devices. SDK supports user to configure upper trigger and lower trigger with following options

  • RFID_SCAN
  • SLED_SCAN
  • TERMINAL_SCAN
  • SCAN_NOTIFICATION
  • NO_ACTION

Note: Terminal scan refers to scanner on the Zebra Mobile Computer not on the sled device. In this scenario RFID SDK or the application is not involved to scan the bar code. Terminal scan enables Zebra Mobile Computer’s scan trigger. Each of the hardware triggers can be independently configured with the above options.

Scan notification is notified to the user through trigger HANDHELD_TRIGGER_EVENT notification. The trigger event will have extra field trigger type to indicate whether its RFID trigger press or scan trigger press. It’s up to the user how scan notification will be handled

Trigger type : 0 RFID trigger
Trigger type : 1 Scan trigger
Trigger type : 2 Dual trigger

RFID_SCAN Configure the Hardware trigger to initiate RFID reads
SLED SCAN Applicable for premium plus device to configure the hardware trigger to initiate barcode scan using the scanner in the sled device
SCAN_NOTIFICATION Will post scan trigger notification to user. Will not initiate barcode scan or RFID reads
TERMINAL_SCAN Configure hardware trigger to initiate barcode scan on the terminal. This would be applicable only for Zebra Mobile Computers connected to SLED device through eConnex
NO_ACTION will mute hardware trigger functionality

Performing operation


try {
    ENUM_NEW_KEYLAYOUT_TYPE UpperTrigger, LowerTrigger;
    UpperTrigger = ENUM_NEW_KEYLAYOUT_TYPE.SLED_SCAN;
    LowerTrigger =   ENUM_NEW_KEYLAYOUT_TYPE.RFID;

    RFIDResults result = mConnectedReader.Config.setKeylayoutType(UpperTrigger, LowerTrigger);
    if(result == RFIDResults.RFID_API_SUCCESS){


    } else{
    
    }

} catch (InvalidUsageException e) {
    if( e!= null && e.getStackTrace().length>0){ Log.e(TAG, e.getStackTrace()[0].toString()); }
    } catch (OperationFailureException e) {
    if( e!= null && e.getStackTrace().length>0){ Log.e(TAG, e.getStackTrace()[0].toString()); }
}

                                                        
                                                        
                                                    

Alternate legacy API call

This feature applies for RFD40 and RFD90 devices. SDK supports user to configure 4 key layouts which impacts RFD40 standard, premium and Premium plus units. RFD40/RFD90 devices provide two keys for RFID and SCAN operations. The two keys can be configured for following key layouts.

  • UPPER_TRIGGER_FOR_RFID
  • UPPER_TRIGGER_FOR_SCAN
  • LOWER_TRIGGER_FOR_SLED_SCAN
  • UPPER_TRIGGER_FOR_SLED_SCAN

Below Table provides how this configuration impacts for RFD40 standard and RFD40 Premium devices

KeyLayout Type Upper trigger Functionality (Default Keymap) Lower Trigger Functionality
UPPER_TRIGGER_FOR_RFID RFID Scan enable on the terminal
UPPER_TRIGGER_FOR_SCAN Scan enable on the terminal RFID
LOWER_TRIGGER_FOR_SLED_SCAN RFID Disable Terminal scan (Need to use terminal scan button)
UPPER_TRIGGER_FOR_SLED_SCAN Disable Terminal scan (Need to use terminal scan button) RFID

Below Table provides how this configuration impacts for RFD40 Premium Plus and RFD90 devices

KeyLayout Type Upper trigger Functionality (Default Keymap) Lower Trigger Functionality
UPPER_TRIGGER_FOR_RFID RFID Scan enable on the terminal
UPPER_TRIGGER_FOR_SCAN Scan enable on the terminal RFID
LOWER_TRIGGER_FOR_SLED_SCAN RFID Used for sled scan
UPPER_TRIGGER_FOR_SLED_SCAN Used for sled scan RFID

Performing operation


    Try{
        reader.Config.setKeylayoutType(ENUM_KEYLAYOUT_TYPE.UPPER_TRIGGER_FOR_RFID);
    } catch (InvalidUsageException e) {
        e.printStackTrace();
    } catch (OperationFailureException e) {
        e.printStackTrace();
    }