0

I'm new for android development. I was using UsingSmartCardAPI tutorial to understand how to access Secure Element using the SmartCard Api. Unfortunately I'm getting error when try to run the project. Tutorial Link - http://code.google.com/p/seek-for-android/wiki/UsingSmartCardAPI

Appreciate if someone can help me on this.

chinna_82
  • 6,353
  • 17
  • 79
  • 134
  • Error : java.lang.IllegalStateException: service not connected to system at org.simalliance.openmobileapi.SEService.getReaders at com.gieseckedevrient.android.hellosmartcard.MainActivity$1.onClick – chinna_82 Feb 08 '12 at 03:36
  • the code exactly same as the tutorial – chinna_82 Feb 08 '12 at 03:37

1 Answers1

0

Not sure if you found the answer, but what fixed the problem for me were the following (I'm using Android Studio to develop an app using the SmartCard API with an actual Android device, not an emulator with PC/SC) :

  1. Ensuring your device can support SmartCardService
  2. Including import directives of the simalliance library in all the activities that use it and putting the following lines in my app gradle : provided files('libs/org.simalliance.openmobileapi.jar') provided fileTree(include: ['*.jar'], dir: 'libs')

Once I changed those two lines from compiled to provided, my service connected.