I'm wrote java console app with smartcardio.Everything worked perfect.Now I want to use this library in Android. As I know smartcardio does not supported in Android. I searched about in Google.If anyone knows how I can use this library in Android,or what's a alternative ? Thanks
-
You don't. How will a Java SmartCard even communicate (physically) with a Android device? – Morrison Chang Nov 01 '17 at 06:27
-
I would to send APDU commands in my custom Android device,witch support only card reader,custom chines Device @ Morrison Chang – BekaKK Nov 01 '17 at 06:35
-
Please clarify are you using custom hardware or purchased external device to communicate with Java SmartCard? – Morrison Chang Nov 01 '17 at 06:41
-
I'm using custom hardware @Morrison Chang – BekaKK Nov 01 '17 at 06:50
-
So Custom ROM or using Android Things low level APIs to communicate with hardware? – Morrison Chang Nov 01 '17 at 06:58
-
Yep.That's right @Morrison Chang – BekaKK Nov 01 '17 at 07:00
-
While you should be able to wrap hardware access in a service: http://www.linaro.org/blog/adding-a-new-system-service-to-android-5-tips-and-how-to/ you would be writing your own Embedded Android driver and then layering on top of that an equivalent API to `javax.smartcardio`. Good luck. – Morrison Chang Nov 01 '17 at 07:47
-
I found android library ,I can't import it in Android studio.Here is a library https://github.com/seek-for-android/pool @MorrisonChang – BekaKK Nov 01 '17 at 08:02
3 Answers
Try to use this alternative. Code looks pretty the same. You will need clone project. Compile jar. And put into Android project lib directory.

- 173
- 2
- 9
-
1
-
1I don't think, your solution works on android, because it is a wrapper for winscard.dll and it doesn't exist on android. – Mohsen Gorgani Nov 21 '17 at 06:33
You cannot use smartcardio library in Android as you have already figured out. If your intention is to communicate to a Smart Card in contactless interface i would suggest you to take a look at the following library https://developer.android.com/reference/android/nfc/package-summary.html https://developer.android.com/guide/topics/connectivity/nfc/advanced-nfc.html
If your intention is to communicate to a SE you can take a look at https://github.com/seek-for-android/pool/wiki/UsingSmartCardAPI

- 197
- 3
- 15
if you want use ccid smartcard reader you have to find ccid library for android. some company like acs has published library for android.
for contactless support you have to use specific package which is defined in android (android.nfc). Maybe this link can help you. http://www.codexpedia.com/android/android-nfc-read-and-write-example/
good luck.

- 420
- 4
- 18