Skip to content

RFID reader

Use the method below to open RFID chip reading controller and start its processing:

public void StartRFID()
{
    DocumentReader.Instance().StartRFIDReader(this, this);
}

public void OnCompleted(int action, DocumentReaderResults results, string error)
{
    if (action == DocReaderAction.Complete)
    {
        Toast.MakeText(this, "Completed", ToastLength.Long).Show();
    }
    else
    {
        // something happened before all results were ready
        if (action == DocReaderAction.Cancel)
        {
            Toast.MakeText(this, "Scanning was cancelled", ToastLength.Long).Show();
        }
        else if (action == DocReaderAction.Error)
        {
            Toast.MakeText(this, "Error:" + error, ToastLength.Long).Show();
        }
    }
}
void startRfid()
{
    RGLDocReader.Shared.StartRFIDReaderFromPresenter(this, HandleDocumentReaderRfidCompletion);
}

void HandleDocumentReaderRfidCompletion(RGLDocReaderAction action, RGLDocumentReaderResults result, string error)
{
    switch (action)
    {
        case RGLDocReaderAction.Cancel:
        case RGLDocReaderAction.Error:
        case RGLDocReaderAction.Complete:
            break;
    }
}