RFID SDK for Android Programming Practices

RFID SDK for Android 2.0.1.15

Overview

This guide provides a details about general programming practices to work with RFID API3

SDK concurrency guidelines

Use synchronization method to cover connection, configuration, and disconnection blocks.

  • Connection related APIs
  • 
    synchronized (lock) { 
        readers.GetAvailableRFIDReaderList(); 
        reader.Connect(); 
        // Code related to configuration and initial setup after connection 
        ConfigureRfidReader(); 
    }
    
  • Disconnection related APIs
  • 
    synchronized (lock) { 
        reader.disconnect(); 
        readers.Dispose(); 
    }                                                    
                                                        

Calling from Main UI Thread

The following APIs must be called from background thread

  • GetAvailableRFIDReaderList
  • connect
  • disconnect
  • Dispose