Rfid Reader Sdk Example App won't work

J Jens Weiermann 3 years 4 months ago
169 0 0

Hi, I have a MC3390R device here waiting to be programmed, so I downloaded the "Rfid Reader Sdk for Xamarin (Android)", version 2.0.1.34 dated September 20, 2020. I'm using Visual Studio 2019 Version 16.10.2 to debug an app on an MC3390R device running Android 10 with Rfid Manager version 2.0.10.5 and Service version 2.0.4.4.

Being a noob when it comes to Xamarin / Android programming, I wanted to go the easy route and start with the example app which is part of the sdk. But even this won't work - no readers can be found...
I've tracked this down to an exception happening in the call to Readers.GetAvailableRFIDReaderList: "RFID service is not installed or available Failure in resolving dependency". Here's the complete call stack:

Com.Zebra.Rfid.Api3.InvalidUsageException: Exception of type 'Com.Zebra.Rfid.Api3.InvalidUsageException' was thrown.
at Java.Interop.JniEnvironment+InstanceMethods.CallObjectMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00068] in :0
at Android.Runtime.JNIEnv.CallObjectMethod (System.IntPtr jobject, System.IntPtr jmethod) [0x00000] in /Users/builder/azdo/_work/2/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnv.g.cs:96
at Com.Zebra.Rfid.Api3.Readers.get_AvailableRFIDReaderList () [0x00043] in <7b81b829362d447199c32047593f2afd>:0
at ZebraRFIDXamarinDemo.Models.ReaderModel.GetAvailableReaders () [0x00032] in C:\ZebraRFIDXamarinDemo\ZebraRFIDXamarinDemo\ZebraRFIDXamarinDemo\Models\ReaderModel.cs:141
--- End of managed Com.Zebra.Rfid.Api3.InvalidUsageException stack trace ---
com.zebra.rfid.api3.InvalidUsageException
at com.zebra.rfid.api3.Readers.a(SourceFile:230)
at com.zebra.rfid.api3.Readers.GetAvailableRFIDReaderList(SourceFile:117)

I also found the following lines in the device log which seem to be related:

06-25 08:13:09.417: W/System.err(24959): android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{com.zebra.rfid.rfidmanager/com.zebra.rfid.rfidmanager.RFIDService}
06-25 08:13:09.418: W/System.err(24959): at android.app.ApplicationPackageManager.getServiceInfo(ApplicationPackageManager.java:490)
06-25 08:13:09.418: W/System.err(24959): at com.zebra.rfid.api3.Readers.a(SourceFile:208)
06-25 08:13:09.418: W/System.err(24959): at com.zebra.rfid.api3.Readers.GetAvailableRFIDReaderList(SourceFile:117)

The pre-compiled .apk (of the very same app) that ships with the SDK works fine when copied to the device, so I think it has to be a build-time problem, but I have no further clues.

Can anyone help?

CONTACT
Can’t find what you’re looking for?