Frequently Asked Questions / How do I tell when a tag is scanned?

One of the features of IDBLUE.HF and IDBLUE.UHF is having an internal real-time clock to allow time-stamping of each tag scan. The IDBLUE driver/sdk returns the timestamp (and with HF, it also returns the tag UID) on a scan.

//Setup the hfResponseHandler as needed
IHfResponseHandler _hfResponseHandler = new HfResponseHandler() {
    public void readTagIdResponse(IDBlueCommand command, ReadTagIdResponse response)
        // response.async() indicates whether the tag scan resulted from
        // a button press of IDBLUE (async), or from a call to readTagId (sync).
        String async = response.async() ? "Async Tag ID" : "Sync Tag ID";

        RfidTag tag = response.rfidTag();
        IDBlueTimestamp scanTime = response.timestamp();

        String tagId = tag.toString();
        String ts = scanTime.toString();

        OnSuccess(READ_TAG_ID_MODE, String.format("%s: %s, Timestamp: %s.", async, tagId, ts));

Note that the IDBLUE driver/sdk does not set the timestamp on the reader as it is the responsibility of the client app to call setTimestamp() at some point in order to setup a valid timestamp on the reader.

If you have any further questions, you can contact IDBLUE Support.

Posted in: Software and Development