Inventory Tutorial

RFID SDK for Xamarin


This Tutorial provides a walk-through of the steps to perform Inventory operation using Xamarin RFID SDK

Create the Project

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


A Simple continuous Inventory operation reads all tags in the field of view on all antennas of the connected RFID reader. It uses no filters (pre-filters or post-filters) and the start and stop trigger for the inventory is the default - immediate type. forexample, start immediately when reader.Actions.Inventory.perform() is called, and stop immediately when reader.Actions.Inventory.stop() is called

Setting it up

Event and Trigger configuration to setup operation

// tag event with tag data
// application will collect tag using getReadTags API

TriggerInfo triggerInfo = new TriggerInfo();
triggerInfo.StartTrigger.TriggerType = START_TRIGGER_TYPE.StartTriggerTypeImmediate;
triggerInfo.StopTrigger.TriggerType = STOP_TRIGGER_TYPE.StopTriggerTypeImmediate;

// set start and stop triggers
Reader.Config.StartTrigger = triggerInfo.StartTrigger;
Reader.Config.StopTrigger = triggerInfo.StopTrigger;

Performing operation

start and stop inventory calls

    // perform simple inventory 

    // Sleep or wait

    // stop the inventory 

catch (InvalidUsageException e)
catch ( OperationFailureException e) {

Grab the results

Gets results in eventreadnotify when reader starts reporting the read tags

// Read Event Notification
public void EventReadNotify(RfidReadEvents e)
    TagData[] myTags = Reader.Actions.GetReadTags(100);
    if (myTags != null)
        for (int index = 0; index < myTags.Length; index++)
            Console.Out.WriteLine("Tag ID " + myTags[index].TagID);

Closer look

  • API call Inventory.Perform() starts operation on reader
  • API call Inventory.Stop() stops operation on reader
  • API call GetReadTags request to retrieve 100 tags from SDK's internal queue of tags, one can change this number as per tag reading speed or application processing speed

What's Next

  • Print various status notification in eventStatusNotify to see inventory start and stop events
  • SetAttachTagDataWithReadEvent to true and receive each tag data in RfidReadEvents