Hi all,
we have an Android application (Java 17, SDK 34, Android 14, Zebra API3) which connects to a Zebra RFID reader (RFD8500) for tag scanning and inventory. We are using inventory function (connectedRfidReader.Actions.Inventory.perform();, or .stop();) to read all tags nearby. On this event (@Override method eventReadNotify), we want to set a logic that changes the reader volume, something like that:
@Override
public void eventReadNotify(RfidReadEvents rfidReadEvents) {
if (null != connectedRfidReader) {
for (ReaderListener observer : observers) {
observer.onGetReadTags(connectedRfidReader.Actions.getReadTagsEx(INVENTORY_READING_ITEMS));
}
}
if(condition) {
try {
ReaderManager.getInstance().setVolumeBeeper(BEEPER_VOLUME.QUIET_BEEP);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
} else {
try {
ReaderManager.getInstance().setVolumeBeeper(BEEPER_VOLUME.HIGH_BEEP);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
}
where ReaderManager.getInstance().setVolumeBeeper(BEEPER_VOLUME.HIGH_BEEP);
is:
public void setVolumeBeeper(BEEPER_VOLUME volumeBeeper) {
if (null != connectedRfidReader
&& connectedRfidReader.isConnected()) {
try {
connectedRfidReader.Config.setBeeperVolume(volumeBeeper);
connectedRfidReader.Config.saveConfig();
} catch (InvalidUsageException | OperationFailureException e) {
e.printStackTrace();
}
} else {
Toast.makeText(context, R.string.rfid_no_reader, Toast.LENGTH_SHORT).show();
}
}
The issue we're facing is that, whenever we call the method, we receive an exception (OperationFailureException). The weird thing is that if we call the same method from another part of the application, it works fine...
Can someone help?
Thanks in advance,
Claudia
1 Replies
Hi Claudia.
The most common reason for what occurs similar to you is that there is an existing Operation still occurring.
You can only set the Beeper when the RFID Reader is not being prepared for an Inventory / Trigger pull.
You see this when the 123RFID Mobile app goes to make any settings changes like this - that these changes are done in the RFID Settings Sub-menu UI.
When you are in these menus (and not the Rapid Read / Inventory Menu) the RFD8500 is available for these kind of Configuraiton commands to be sent to the RFD8500.