Option for Choosing between jcardsim and vicc

This commit is contained in:
Frank Morgner
2016-04-14 09:46:16 -04:00
parent 67a68246c7
commit 524ef6b6aa
5 changed files with 88 additions and 12 deletions

View File

@@ -38,5 +38,14 @@
\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>
<string name="action_settings">Settings</string>
<string-array name="strEmulators">
<item>@string/jcardsim</item>
<item>@string/vicc</item>
</string-array>
<string name="jcardsim">Builtin Java Card Simulator</string>
<string name="vicc">Remote Virtual Smart Card</string>
<string name="vicc_config_info">If you choose the virtual smart card (VICC) as emulator, you need to start the it on your computer with the `--reversed` flag and configure the connection parameters here accordingly.</string>
<string name="hint_vicc_port">VICC Port</string>
<string name="hint_vicc_hostname">VICC Hostname</string>
</resources>

View File

@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<ListPreference
android:key="emulator"
android:title="Smart Card Emulator"
android:defaultValue="@string/vicc"
android:entries="@array/strEmulators"
android:entryValues="@array/strEmulators" />
<PreferenceCategory
android:title="Java Card Emulator">
android:title="@string/jcardsim"
android:key="jc_settings"
>
<SwitchPreference
android:title="@string/applet_helloworld"
@@ -37,4 +46,33 @@
</PreferenceCategory>
<PreferenceCategory
android:title="@string/vicc"
android:key="vicc_settings"
>
<Preference
android:title="Virtual Smart Card Available on Github"
android:summary="@string/vicc_config_info">
<intent android:action="android.intent.action.VIEW"
android:data="https://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html" />
</Preference>
<EditTextPreference
android:key="hostname"
android:defaultValue="10.0.2.2"
android:title="@string/hint_vicc_hostname"
android:hint="URL or IP address"
android:inputType="textUri" />
<EditTextPreference
android:key="port"
android:defaultValue="35963"
android:title="@string/hint_vicc_port"
android:inputType="number"
android:hint="Default: 35963" />
</PreferenceCategory>
</PreferenceScreen>