Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Scanning Rfid Tag In Android Version 11 #6

Open
Justin-roy opened this issue Nov 25, 2022 · 32 comments
Open

Not Scanning Rfid Tag In Android Version 11 #6

Justin-roy opened this issue Nov 25, 2022 · 32 comments

Comments

@Justin-roy
Copy link

I'm Using C72 Device It's Won't Working On Android 11 but working On Android 8

@amorenew
Copy link
Owner

@Justin-roy I don't have the hardware of reader c72 as I left the company which I made this plugin for, so I can't help.
But if you have the official SDK then you can use this plugin as a guideline to build your own plugin

@Justin-roy
Copy link
Author

Like I don't know how integrate/upgrade can u please provide link or resouces for implementation.

@amorenew
Copy link
Owner

@Justin-roy You need to know some java background to integrate the existing SDK you have from your hardware provider

More info about creating a plugin for Flutter
https://codelabs.developers.google.com/codelabs/write-flutter-plugin#0
https://docs.flutter.dev/development/packages-and-plugins/developing-packages

@Justin-roy
Copy link
Author

Justin-roy commented Nov 26, 2022

So, can i replace with latest sdk in android/libs with --> cw-deviceapi20191022 to cw-deviceapi20220607

@amorenew
Copy link
Owner

@Justin-roy I am not sure if it would work or not

@Justin-roy
Copy link
Author

Justin-roy commented Nov 28, 2022

Hey please tell me how you integrate native sdk for flutter.
like step 1. create folder in libs in android/libs etc.
it's really helpful for beginners.

@amorenew
Copy link
Owner

amorenew commented Nov 28, 2022

@Justin-roy
The first step is to clean up the existing native sample from your hardware provider.
You need to make a helper class like this file which contains all possible functions I needed
https://github.com/amorenew/uhf_c72_plugin/blob/master/android/src/main/java/com/amorenew/c72/uhf_plugin/helper/UHFHelper.java

Do you know Java?

@Justin-roy
Copy link
Author

Yes I need this all functionality like this and yeah I know java.
this is the latest sdk for android 11 how to integrate this.
link:-https://www.chainway.net/download/SDKs-Android/demo-uhf_as.rar

@amorenew
Copy link
Owner

@Justin-roy After replacing the libs jars is it working for you?
If the helper is same and you replaced jars then I don't know what could be missing

@Justin-roy
Copy link
Author

not working

@amorenew
Copy link
Owner

@Justin-roy Do you have any errors while running the project? like permission error?
And do your example still works after replacing jars on Android 8?

@amorenew
Copy link
Owner

@Justin-roy I suspect it is permissions issue, I don't have the following code in my library

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
// 先判断有没有权限
if (!Environment.isExternalStorageManager()) {
Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION);
intent.setData(Uri.parse("package:" + getPackageName()));
startActivityForResult(intent, 0);
finish();
}
}

@Justin-roy
Copy link
Author

no not working in both can you please add this sdk in your plugin for android 11 support. please

@amorenew
Copy link
Owner

@Justin-roy Cleaning up this SDK and making a helper class could take me 5 hours, as I have to dig in the code and remove UI from the logic to build the helper class

@Justin-roy
Copy link
Author

i will help in ui part please integrate sdk :D

@amorenew
Copy link
Owner

push the project to GitHub and add me to my account
then make a helper class so no UI button call a logic directly but the helper class functions and make sure it works
for events you need to make a listener and add it to the helper class like what I have in my helper class
let me know once you made the helper class

@Justin-roy
Copy link
Author

ok

@Justin-roy
Copy link
Author

@amorenew
invited

@ekaeriana
Copy link

Hai, Mr. @Justin-roy have you fix this issue?

@developerflutter
Copy link

Do you have any update on the working solution? @Justin-roy @amorenew

@amorenew
Copy link
Owner

@developerflutter It requires a new plugin as China Highway made changes to support Android 11
It would take more than 5 hours to make it however that I will not use it as I left the company which I made this plugin for, since 3 years ago

@developerflutter
Copy link

So we don't have any option? Any other work around for this?

@amorenew
Copy link
Owner

No workaround only making a new plugin from the native SDK

@HamidMusayev
Copy link

HamidMusayev commented Mar 2, 2023

The problem is that android 11 version of this devices have differend libs. After weeks effort I fixed the issue by contact device manufacturers and they sent me lib files which have same implementation as this package and all you need to do some lib file replacing. If you have questions I can help.

I created docs for for full implementation of android 11. If urls won't work reply

https://docs.google.com/document/d/1nf5T2_Et1J27ngdF8ntpgxS9q2C1P1rQ/edit?usp=sharing&ouid=104635957823981061801&rtpof=true&sd=true

Example app (you can find libs and updated plugin here)
Note: don't forget to check your project android/libs folder and gradle like picture
https://github.com/HamidMusayev/agromis_app

image

@amorenew
Copy link
Owner

amorenew commented Mar 2, 2023

@HamidMusayev Could you make a PR with this fix?

@HamidMusayev
Copy link

@HamidMusayev Could you make a PR with this fix?

I'm sorry. I don't have this devices anymore

@okkidoggi
Copy link

The problem is that android 11 version of this devices have differend libs. After weeks effort I fixed the issue by contact device manufacturers and they sent me lib files which have same implementation as this package and all you need to do some lib file replacing. If you have questions I can help.

I created docs for for full implementation of android 11. If urls won't work reply

https://docs.google.com/document/d/1nf5T2_Et1J27ngdF8ntpgxS9q2C1P1rQ/edit?usp=sharing&ouid=104635957823981061801&rtpof=true&sd=true

Example app (removed codebase) https://drive.google.com/file/d/1mWnvkcT4IV9bqtzXYZ_dJbenCqLd3yXV/view?usp=sharing

image

Can i have the latest .aar file and also the link to download the plugin? The links
are not valid anymore.

@HamidMusayev
Copy link

@okkidoggi I uploaded my app and updated link.

@okkidoggi
Copy link

@HamidMusayev Thank you so much! but I still couldn't make it work, probably because I am using Chainway C66 instead of C72. I thought they are using same AAR.

@HamidMusayev
Copy link

@HamidMusayev Thank you so much! but I still couldn't make it work, probably because I am using Chainway C66 instead of C72. I thought they are using same AAR.

You have to contant to device seller, they will send you device specific aar files

@Justin-roy
Copy link
Author

The problem is that android 11 version of this devices have differend libs. After weeks effort I fixed the issue by contact device manufacturers and they sent me lib files which have same implementation as this package and all you need to do some lib file replacing. If you have questions I can help.

I created docs for for full implementation of android 11. If urls won't work reply

https://docs.google.com/document/d/1nf5T2_Et1J27ngdF8ntpgxS9q2C1P1rQ/edit?usp=sharing&ouid=104635957823981061801&rtpof=true&sd=true

Example app (you can find libs and updated plugin here) Note: don't forget to check your project android/libs folder and gradle like picture https://github.com/HamidMusayev/agromis_app

image

Yes Just download latest sdk and replace older one. and follow this steps. then ready to use in android 11 :D

@Justin-roy
Copy link
Author

Justin-roy commented Jun 1, 2023

Hey everyone I added android 11 support in Rfid C72 https://github.com/Justin-roy/Rfid_c72_plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants