Adds info pop up
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</facet>
|
</facet>
|
||||||
</component>
|
</component>
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
||||||
|
|||||||
@@ -12,10 +12,12 @@
|
|||||||
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
||||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||||
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
|
|
||||||
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
|
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
|
||||||
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
|
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
|
||||||
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
|
<afterSyncTasks>
|
||||||
|
<task>generateDebugAndroidTestSources</task>
|
||||||
|
<task>generateDebugSources</task>
|
||||||
|
</afterSyncTasks>
|
||||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
||||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
||||||
@@ -24,7 +26,7 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</facet>
|
</facet>
|
||||||
</component>
|
</component>
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
|
||||||
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
||||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
|
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
@@ -53,7 +55,6 @@
|
|||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/external/jcardsim/src/main/java" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/external/IsoApplet/src" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/external/IsoApplet/src" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/external/android-scio/src/main" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/external/android-scio/src/main" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/external/ykneo-openpgp/applet/src" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/external/ykneo-openpgp/applet/src" isTestSource="false" />
|
||||||
@@ -96,5 +97,6 @@
|
|||||||
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
|
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
|
||||||
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
|
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
|
||||||
<orderEntry type="library" exported="" name="core-1.51.0.0" level="project" />
|
<orderEntry type="library" exported="" name="core-1.51.0.0" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="jcardsim-3.0.4-SNAPSHOT-android" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
@@ -19,15 +19,18 @@
|
|||||||
|
|
||||||
package com.vsmartcard.acardemulator;
|
package com.vsmartcard.acardemulator;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
import android.support.v7.app.ActionBarActivity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
import android.text.Layout;
|
import android.text.Layout;
|
||||||
import android.text.method.ScrollingMovementMethod;
|
import android.text.method.ScrollingMovementMethod;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
@@ -83,6 +86,8 @@ public class MainActivity extends ActionBarActivity {
|
|||||||
IntentFilter intentFilter = new IntentFilter();
|
IntentFilter intentFilter = new IntentFilter();
|
||||||
intentFilter.addAction(SimulatorService.TAG);
|
intentFilter.addAction(SimulatorService.TAG);
|
||||||
bManager.registerReceiver(bReceiver, intentFilter);
|
bManager.registerReceiver(bReceiver, intentFilter);
|
||||||
|
|
||||||
|
showStartupMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -107,6 +112,9 @@ public class MainActivity extends ActionBarActivity {
|
|||||||
case R.id.action_delete:
|
case R.id.action_delete:
|
||||||
textViewVPCDStatus.setText("");
|
textViewVPCDStatus.setText("");
|
||||||
return true;
|
return true;
|
||||||
|
case R.id.action_help:
|
||||||
|
showStartupMessage();
|
||||||
|
return true;
|
||||||
default:
|
default:
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
@@ -125,4 +133,16 @@ public class MainActivity extends ActionBarActivity {
|
|||||||
savedInstanceState.putCharSequence(saved_status_key, textViewVPCDStatus.getText());
|
savedInstanceState.putCharSequence(saved_status_key, textViewVPCDStatus.getText());
|
||||||
super.onSaveInstanceState(savedInstanceState);
|
super.onSaveInstanceState(savedInstanceState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showStartupMessage() {
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
|
builder.setMessage(R.string.startup_message)
|
||||||
|
.setTitle(R.string.startup_title)
|
||||||
|
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
}
|
||||||
|
});;
|
||||||
|
AlertDialog dialog = builder.create();
|
||||||
|
dialog.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,4 +13,9 @@
|
|||||||
android:icon="@drawable/ic_action_delete"
|
android:icon="@drawable/ic_action_delete"
|
||||||
app:showAsAction="withText" />
|
app:showAsAction="withText" />
|
||||||
|
|
||||||
|
<item android:id="@+id/action_help"
|
||||||
|
android:title="@string/action_help"
|
||||||
|
android:icon="@android:drawable/ic_menu_help"
|
||||||
|
app:showAsAction="withText" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<string name="action_restart">Restart Emulator</string>
|
<string name="action_restart">Restart Emulator</string>
|
||||||
<string name="action_copy">Copy Log</string>
|
<string name="action_copy">Copy Log</string>
|
||||||
<string name="action_delete">Clear Log</string>
|
<string name="action_delete">Clear Log</string>
|
||||||
|
<string name="action_help">Show Help</string>
|
||||||
|
|
||||||
<string name="aid_isoapplet">F276A288BCFBA69D34F31001</string>
|
<string name="aid_isoapplet">F276A288BCFBA69D34F31001</string>
|
||||||
<string name="applet_isoapplet">Philip Wendland\'s ISO Applet</string>
|
<string name="applet_isoapplet">Philip Wendland\'s ISO Applet</string>
|
||||||
@@ -24,5 +25,15 @@
|
|||||||
<string name="applet_oath">Yubico\'s OATH Applet</string>
|
<string name="applet_oath">Yubico\'s OATH Applet</string>
|
||||||
<string name="aid_muscle">A00000000101</string>
|
<string name="aid_muscle">A00000000101</string>
|
||||||
<string name="applet_muscle">MUSCLE Applet</string>
|
<string name="applet_muscle">MUSCLE Applet</string>
|
||||||
|
<string name="startup_title">Tap To Emulate!</string>
|
||||||
|
<string name="startup_message">The following smart card applets are supported:\n
|
||||||
|
\n
|
||||||
|
<b>Hello World Applet</b> <small>(AID F000000001)</small>\n
|
||||||
|
<b>OpenPGP Applet</b> <small>(AID D2760001240102000000000000010000)</small>\n
|
||||||
|
<b>OATH Applet</b> <small>(AID A000000527210101)</small>\n
|
||||||
|
<b>ISO Applet</b> <small>(AID F276A288BCFBA69D34F31001)</small>\n
|
||||||
|
<b>MUSCLE Applet</b> <small>(AID A00000000101)</small>\n
|
||||||
|
\n
|
||||||
|
Place your device on a contact-less reader. When the reader issues a SELECT command for one of the application identifiers above, the emulator creates the appropriate applet. The emulated applet will then handle all subsequent APDUs.</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user