Adds info pop up
This commit is contained in:
@@ -19,15 +19,18 @@
|
||||
|
||||
package com.vsmartcard.acardemulator;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.Layout;
|
||||
import android.text.method.ScrollingMovementMethod;
|
||||
import android.view.Menu;
|
||||
@@ -83,6 +86,8 @@ public class MainActivity extends ActionBarActivity {
|
||||
IntentFilter intentFilter = new IntentFilter();
|
||||
intentFilter.addAction(SimulatorService.TAG);
|
||||
bManager.registerReceiver(bReceiver, intentFilter);
|
||||
|
||||
showStartupMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -107,6 +112,9 @@ public class MainActivity extends ActionBarActivity {
|
||||
case R.id.action_delete:
|
||||
textViewVPCDStatus.setText("");
|
||||
return true;
|
||||
case R.id.action_help:
|
||||
showStartupMessage();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
@@ -125,4 +133,16 @@ public class MainActivity extends ActionBarActivity {
|
||||
savedInstanceState.putCharSequence(saved_status_key, textViewVPCDStatus.getText());
|
||||
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"
|
||||
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>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<string name="action_restart">Restart Emulator</string>
|
||||
<string name="action_copy">Copy Log</string>
|
||||
<string name="action_delete">Clear Log</string>
|
||||
<string name="action_help">Show Help</string>
|
||||
|
||||
<string name="aid_isoapplet">F276A288BCFBA69D34F31001</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="aid_muscle">A00000000101</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>
|
||||
|
||||
Reference in New Issue
Block a user