Rfid for Flutter

// Expert user has replied.
A Anup Tiwari 2 years 3 months ago
1519 13 0

Hi Everyone ,
I tried of downloading 123RFID sdk which is in Java but i am supposed to implement it in Flutter .
The package Zebra_rfid for flutter in Pub.dev has a repo of github and the sample code to establish the connection with RFID device but it has an error
cancelling listener
W/ZebraRfidPlugin(10632): adding listener
D/RFIDHandler(10632): CreateInstanceTask
D/RFIDAPI3(10632): Rfid Service not available..
W/System.err(10632): android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{com.zebra.rfid.rfidmanager/com.zebra.rfid.rfidmanager.RFIDService}
W/System.err(10632): at android.app.ApplicationPackageManager.getServiceInfo(ApplicationPackageManager.java:490)
W/System.err(10632): at com.zebra.rfid.api3.Readers.b(SourceFile:34)
W/System.err(10632): at com.zebra.rfid.api3.Readers.GetAvailableRFIDReaderList(SourceFile:6)
W/System.err(10632): at com.hone.zebra_rfid.RFIDHandler$2.doInBackground(RFIDHandler.java:114)
W/System.err(10632): at com.hone.zebra_rfid.RFIDHandler$2.doInBackground(RFIDHandler.java:107)
W/System.err(10632): at android.os.AsyncTask$3.call(AsyncTask.java:378)
W/System.err(10632): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W/System.err(10632): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
W/System.err(10632): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/System.err(10632): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/System.err(10632): at java.lang.Thread.run(Thread.java:919)
D/RFIDHandler(10632): InvalidUsageException
W/ActivityThread(10632): handleWindowVisibility: no activity for token android.os.BinderProxy@165b467
W/FlutterActivityAndFragmentDelegate(10632): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
W/ZebraRfidPlugin(10632): adding listener
D/RFIDHandler(10632): CreateInstanceTask
D/RFIDAPI3(10632): Rfid Service not available..
W/System.err(10632): android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{com.zebra.rfid.rfidmanager/com.zebra.rfid.rfidmanager.RFIDService}
W/System.err(10632): at android.app.ApplicationPackageManager.getServiceInfo(ApplicationPackageManager.java:490)
W/System.err(10632): at com.zebra.rfid.api3.Readers.b(SourceFile:34)
W/System.err(10632): at com.zebra.rfid.api3.Readers.GetAvailableRFIDReaderList(SourceFile:6)
W/System.err(10632): at com.hone.zebra_rfid.RFIDHandler$2.doInBackground(RFIDHandler.java:114)
W/System.err(10632): at com.hone.zebra_rfid.RFIDHandler$2.doInBackground(RFIDHandler.java:107)
W/System.err(10632): at android.os.AsyncTask$3.call(AsyncTask.java:378)
W/System.err(10632): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W/System.err(10632): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
W/System.err(10632): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/System.err(10632): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/System.err(10632): at java.lang.Thread.run(Thread.java:919)
D/RFIDHandler(10632): InvalidUsageException

Device used : Zebra TC26
what can be the probable solution for this ? Please let me know .
Thank you

Regards,
Anup

Please Register or Login to post a reply

13 Replies

J James Swinton-Bland

Hi,

What device are you running on? Looks like the RFID service isn't present on the device.

 

A Anup Tiwari

Using the device TC26

J James Swinton-Bland

The TC26 doesn't have RFID support - you'll either need to use something like an RFD40 / RFD2000 to enable RFID.

A Anup Tiwari

Sorry , I am Using
RFD4030 - G00B700-IN

J James Swinton-Bland

Looks like the flutter wrapper is using V2.0.1.29 of the RFID3 SDK. RFD40 support was added in V2.0.1.44 - please use at least this version, or ideally the latest version, available here: https://www.zebra.com/us/en/support-downloads/software/developer-tools/…

A Anup Tiwari

Thank you but they are all for the sdk of Android in Java , I want a solution for Flutter in dart.

J James Swinton-Bland

We don't officially support Flutter for our SDKs. You would need to modify the wrapper you're using from pub.dev to use the latest version of the SDK. It should be as straight forward as just replacing the .aar file in the wrapper with the latest versions - there shouldn't be any code changes required as the APIs are backwards compatible.

A Anup Tiwari

Okay,
Can you assist me how can we change the wrapper ?
That would be helpful for us and our team .

J James Swinton-Bland

Replace the .aar file in this directory with the latest version then recompile the library

A Anup Tiwari

I replaced the latest .aar file (API3_LIB-release-2.0.2.94)
but still got same issue .

adding listener
D/RFIDAPI3(19531): SDK Version:2.0.1.29
D/RFIDHandler(19531): CreateInstanceTask
W/ra_rfid_exampl(19531): Accessing hidden method Landroid/os/ServiceManager;->getService(Ljava/lang/String;)Landroid/os/IBinder; (greylist, linking, allowed)
D/RFIDAPI3(19531): Rfid Service not available..
W/System.err(19531): android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{com.zebra.rfid.rfidmanager/com.zebra.rfid.rfidmanager.RFIDService}
W/System.err(19531): at android.app.ApplicationPackageManager.getServiceInfo(ApplicationPackageManager.java:490)
W/System.err(19531): at com.zebra.rfid.api3.Readers.b(SourceFile:34)
W/System.err(19531): at com.zebra.rfid.api3.Readers.GetAvailableRFIDReaderList(SourceFile:6)
W/System.err(19531): at com.hone.zebra_rfid.RFIDHandler$2.doInBackground(RFIDHandler.java:114)
W/System.err(19531): at com.hone.zebra_rfid.RFIDHandler$2.doInBackground(RFIDHandler.java:107)
W/System.err(19531): at android.os.AsyncTask$3.call(AsyncTask.java:378)
W/System.err(19531): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W/System.err(19531): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
W/System.err(19531): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/System.err(19531): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/System.err(19531): at java.lang.Thread.run(Thread.java:919)
D/RFIDHandler(19531): InvalidUsageException

J James Swinton-Bland

Can you please try running the native sample & see if you get the same error?

J James Swinton-Bland

Could you try adding the below to your manifest to see if that works?

<queries>
 <package android:name="com.zebra.rfid.rfidmanager.RFIDService" />
</queries>

 

M Mani A

Hi James,

Thanks for the information you provided earlier. Since that was about a year ago, I wanted to check if there have been any updates. Is there now an official Flutter SDK available for Zebra RFID devices?

If so, we’d appreciate any details or resources you could share.

Thanks in advance for your help!

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