Migrating to NEW SDK to support USB

RFID SDK for Android 2.0.2.124

Applicable Devices : RFD40XX and RFD90XX

Overview

This Tutorial provides a walk-through of the steps to migrate to NEW SDK to support USB

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

The latest SDK has been extended to support USB communication RFD40XX and RFD90XX devices. For your current Applications to support existing devices and to extend it to support RFD40XX, RFD90XX you need to rebuild your application with latest SDK

  1. Re-compile your app with new SDK
  2. Check that Readers are initialized to find devices on USB as well

NOTE:NEW SDK does not require RFID Manager to connect to RFD40 or RFD90 devices. RFID manager installation is required only for RFD2000.

In your application make sure you initialize your reader to discover devices on serial transport and on USB as well. Below code snippet makes sure that we discover devices available through Serial or BT or USB

Please if you had initialized your Reader with ENUM_TRANSPORT.SERIAL then your app will not be able to find RFD40XX and RFD90XX devices . You need to initialize the Reader with Readers readers = new Readers(this, ENUM_TRANSPORT.ALL);



        /* initialize to discover readers on all transport type */
        Readers readers = new Readers (this, ENUM_TRANSPORT.ALL);
        readerList = readers.GetAvailableRFIDReaderList();

        /* define reader available and not available notifications */
        Readers.attach(this)
        
        try {
        /* assuming that it has only one USB reader available 
        Else look for usb device and connect accordingly*/

            readerList.get(0).getRFIDReader().connect();
        } catch (InvalidUsageException e) {
            e.printStackTrace();
        } catch (OperationFailureException e) {
            e.printStackTrace();
        }
        
        /* disconnect the device */
        try {
            readerList.get(0).getRFIDReader().disconnect();
        } catch (InvalidUsageException e) {
            e.printStackTrace();
        } catch (OperationFailureException e) {
            e.printStackTrace();
        }
        
        /* done with everything so dispose it off */
        readers.Dispose();
        

For detailed SDK API support please refer the SDK reference guide from the support central.

https://www.zebra.com/us/en/support-downloads/software/demo/123rfid-mobile.html