diff --git a/.project b/.project deleted file mode 100644 index 53a3798..0000000 --- a/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - seek - - - - - - - - diff --git a/samples/SmartcardSample/.classpath b/samples/SmartcardSample/.classpath deleted file mode 100644 index 1ddd2e3..0000000 --- a/samples/SmartcardSample/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/samples/SmartcardSample/.project b/samples/SmartcardSample/.project deleted file mode 100644 index e42090d..0000000 --- a/samples/SmartcardSample/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - SmartcardSample - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/samples/SmartcardSample/AndroidManifest.xml b/samples/SmartcardSample/AndroidManifest.xml deleted file mode 100644 index 7fe6b60..0000000 --- a/samples/SmartcardSample/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/samples/SmartcardSample/default.properties b/samples/SmartcardSample/default.properties deleted file mode 100644 index 9d6f70d..0000000 --- a/samples/SmartcardSample/default.properties +++ /dev/null @@ -1,13 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-4 -# Indicates whether an apk should be generated for each density. -split.density=false diff --git a/samples/SmartcardSample/res/drawable-hdpi/icon.png b/samples/SmartcardSample/res/drawable-hdpi/icon.png deleted file mode 100644 index 8074c4c..0000000 Binary files a/samples/SmartcardSample/res/drawable-hdpi/icon.png and /dev/null differ diff --git a/samples/SmartcardSample/res/drawable-ldpi/icon.png b/samples/SmartcardSample/res/drawable-ldpi/icon.png deleted file mode 100644 index 1095584..0000000 Binary files a/samples/SmartcardSample/res/drawable-ldpi/icon.png and /dev/null differ diff --git a/samples/SmartcardSample/res/drawable-mdpi/icon.png b/samples/SmartcardSample/res/drawable-mdpi/icon.png deleted file mode 100644 index a07c69f..0000000 Binary files a/samples/SmartcardSample/res/drawable-mdpi/icon.png and /dev/null differ diff --git a/samples/SmartcardSample/res/layout/main.xml b/samples/SmartcardSample/res/layout/main.xml deleted file mode 100644 index 4361cfe..0000000 --- a/samples/SmartcardSample/res/layout/main.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/samples/SmartcardSample/res/values/strings.xml b/samples/SmartcardSample/res/values/strings.xml deleted file mode 100644 index 810ddde..0000000 --- a/samples/SmartcardSample/res/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - Smartcard Sample - diff --git a/samples/SmartcardSample/src/android/smartcard/test/MainActivity.java b/samples/SmartcardSample/src/android/smartcard/test/MainActivity.java deleted file mode 100644 index 6bf6844..0000000 --- a/samples/SmartcardSample/src/android/smartcard/test/MainActivity.java +++ /dev/null @@ -1,163 +0,0 @@ -package android.smartcard.test; - -import android.app.Activity; -import android.os.Bundle; - -// Use new API -import org.simalliance.openmobileapi.*; - -import android.util.Log; -import android.view.ViewGroup; -import android.widget.LinearLayout; -import android.widget.ScrollView; -import android.widget.TextView; - -public class MainActivity extends Activity implements SEService.CallBack { - - private static final byte[] ISD_AID = new byte[] { (byte) 0xA0, 0x00, 0x00, - 0x00, 0x03, 0x00, 0x00, 0x00 }; - - TextView tv = null; - ScrollView sv = null; - - SEService seService; - - private void logText(String message) { - sv.post(new Runnable() { - public void run() { - sv.fullScroll(ScrollView.FOCUS_DOWN); - } - - }); - tv.append(message); - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - ViewGroup.LayoutParams layoutParams = new ScrollView.LayoutParams( - ViewGroup.LayoutParams.FILL_PARENT, - ViewGroup.LayoutParams.WRAP_CONTENT); - - sv = new ScrollView(this); - - LinearLayout ll = new LinearLayout(this); - ll.setLayoutParams(layoutParams); - sv.addView(ll); - - tv = new TextView(this); - tv.setLayoutParams(layoutParams); - ll.addView(tv); - - setContentView(sv); - - try { - seService = new SEService(this, this); - } catch (SecurityException e) { - logText("Smartcard binding not allowed"); - Log.w("SmartCardSample", "Exception: " + e.getLocalizedMessage()); - } catch (Exception e) { - logText("Exception: " + e.getMessage()); - } - } - - @Override - protected void onDestroy() { - if (seService != null) { - seService.shutdown(); - } - super.onDestroy(); - } - - public void serviceConnected(SEService service) { - logText("\nSmartcard interface available\n"); - Reader cardReader = null; - - logText("\ngetReaders()\n"); - try { - for (Reader reader : seService.getReaders()) { - logText(" " + reader.getName() + "\n"); - } - cardReader = seService.getReaders()[0]; - } catch (Exception e) { - logText(e.getMessage()); - return; - } - - logText("\nisCardPresent()\n"); - try { - boolean isPresent = cardReader.isSecureElementPresent(); - logText(isPresent ? " present\n" : " absent\n"); - } catch (Exception e) { - logText(e.getMessage()); - return; - } - logText("\nopenBasicChannel()\n"); - Channel basicChannel; - try { - Session session = cardReader.openSession(); - basicChannel = session.openBasicChannel(null); - } catch (Exception e) { - logText(e.getMessage()); - return; - } - - logText("\ntransmit() (GET CPLC)\n"); - try { - byte[] response = basicChannel.transmit(new byte[] { (byte) 0x80, - (byte) 0xCA, (byte) 0x9F, 0x7F, 0x00 }); - logText(" Response: " + bytesToString(response) + "\n"); - } catch (Exception e) { - logText(e.getMessage()); - return; - } - - logText("\nopenLogicalChannel() (ISD)\n"); - Channel logicalChannel; - try { - Session session = cardReader.openSession(); - logicalChannel = session.openLogicalChannel(ISD_AID); - } catch (Exception e) { - logText(e.getMessage()); - return; - } - - logText("\ntransmit() (GET CPLC)\n"); - try { - byte[] response = logicalChannel.transmit(new byte[] { (byte) 0x80, - (byte) 0xCA, (byte) 0x9F, 0x7F, 0x00 }); - logText(" Response: " + bytesToString(response) + "\n"); - } catch (Exception e) { - logText(e.getMessage()); - return; - } - - logText("\nclose()\n"); - try { - basicChannel.close(); - logText(" basic channel is closed"); - } catch (Exception e) { - logText(e.getMessage()); - return; - } - - logText("\nclose()\n"); - try { - logicalChannel.close(); - logText(" logical channel is closed"); - } catch (Exception e) { - logText(e.getMessage()); - return; - } - - } - - private static String bytesToString(byte[] bytes) { - StringBuffer sb = new StringBuffer(); - for (byte b : bytes) { - sb.append(String.format("%02x ", b & 0xFF)); - } - return sb.toString(); - } -} diff --git a/src/.classpath b/src/.classpath deleted file mode 100644 index 79a8481..0000000 --- a/src/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/.project b/src/.project deleted file mode 100644 index d0c9fb5..0000000 --- a/src/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - seek - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - -