SamphorsKhlok / Ionic-plugin-MyKadReader

Ionic or Cordova plugin to read info from MyKad (Malaysia ID card) using PocketMate Smart Card Reader.
4 stars 6 forks source link

Need support on type C smart card reader usb #2

Open PankajPatel007 opened 5 years ago

PankajPatel007 commented 5 years ago

Hi Samphors Khlok,

I have implemented the same plugin and it's working fine with common Android port devices. But It's not working with type C port devices like OnePlus 6. I have found a new library for type C port Smart Card Reader from the same website. I have mentioned the URL below of the description. It would be very grateful if you integrate the type C library in the existing plugin or guide me to integrate the new library. I appreciate your hard work on this plugin and would like to thanks for that.

Link of Type C plugin: https://www.acs.com.hk/en/products/425/acr39u-nf-pocketmate-ii-smart-card-reader-usb-type-c/

It would be very helpful for me if you reply back as soon as possible. As I can complete my development task at the minimum time. ACS-EVK-Android-114-A.zip

SamphorsKhlok commented 5 years ago

It will take some time to make this work with a different driver. Time and resources (MyKad, TypeC Device, TypeC reader,..etc) are something I dun have right now. Sorry about that. The community now depends on you to update us back once you are done with it. Personally, I just want to contribute as much as I have. The bright side is you are 80% there. Here is another 20% left for your requirement to be fulfilled. You can spend some time on this file CardReader.java. Read the doc on TypeC scanner library how to "power up" the scanner and how you can send the APU command (the command to get the data from MyKad). Back to the time when I did it, it takes time like months to understand how all things work together i.e MyKad layer, Android OS + Cordova,.. there is no magic bullet here.

PankajPatel007 commented 5 years ago

Thank you very much Samphors for your swift response. I will follow your guidelines and complete my work. But here I have a small change in the requirement. You have integrated ACR38U-ND-Micro-USB-Card-Reader(it has acssmc-1.1.3.jar lib). As per my new requirement, I have to develop a plugin for ACR39U-ND-Micro-USB-Card-Reader(it has acssmc-1.1.4.jar lib), not for type C. Still, the concern is same, I have gone through the both SDK comparison and find out the including MainActivity.java code all files are same. There is an only change in three .class files of the library file(.jar). According to I will make changes and merge here.

SamphorsKhlok commented 5 years ago

it is not gonna be easy. All the best ;)