added remote smart card reader app
This commit is contained in:
BIN
remote-reader/app/src/main/res/drawable-hdpi/ic_launcher.png
Normal file
BIN
remote-reader/app/src/main/res/drawable-hdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
BIN
remote-reader/app/src/main/res/drawable-mdpi/ic_launcher.png
Normal file
BIN
remote-reader/app/src/main/res/drawable-mdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
remote-reader/app/src/main/res/drawable-xhdpi/ic_launcher.png
Normal file
BIN
remote-reader/app/src/main/res/drawable-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
remote-reader/app/src/main/res/drawable-xxhdpi/ic_launcher.png
Normal file
BIN
remote-reader/app/src/main/res/drawable-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@@ -0,0 +1,73 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
tools:context="com.vsmartcard.remotesmartcardreader.app.MainActivity">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:text="@string/vpcd_config_info"
|
||||
android:id="@+id/textViewInfo"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@+id/buttonDisConnect" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/editTextHostname"
|
||||
android:hint="@string/hint_vpcd_hostname"
|
||||
android:inputType="textUri"
|
||||
android:layout_below="@+id/textViewInfo"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toLeftOf="@+id/editTextPort" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:ems="10"
|
||||
android:id="@+id/editTextPort"
|
||||
android:hint="@string/hint_vpcd_port"
|
||||
android:layout_below="@+id/textViewInfo"
|
||||
android:layout_toLeftOf="@+id/buttonDisConnect" />
|
||||
|
||||
<Button
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/buttonDisConnect"
|
||||
android:onClick="buttonOnClickDisConnect"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_below="@+id/buttonDisConnect"
|
||||
android:layout_alignRight="@+id/buttonDisConnect"
|
||||
android:layout_alignEnd="@+id/buttonDisConnect" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:id="@+id/textViewLog"
|
||||
android:typeface="monospace"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@+id/editTextHostname" />
|
||||
|
||||
</RelativeLayout>
|
||||
75
remote-reader/app/src/main/res/layout/activity_main.xml
Normal file
75
remote-reader/app/src/main/res/layout/activity_main.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
tools:context="com.vsmartcard.remotesmartcardreader.app.MainActivity">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:text="@string/vpcd_config_info"
|
||||
android:id="@+id/textViewInfo"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/editTextHostname"
|
||||
android:layout_below="@+id/textViewInfo"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:hint="@string/hint_vpcd_hostname"
|
||||
android:inputType="textUri"
|
||||
android:layout_toLeftOf="@+id/editTextPort" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:ems="10"
|
||||
android:id="@+id/editTextPort"
|
||||
android:hint="@string/hint_vpcd_port"
|
||||
android:layout_below="@+id/textViewInfo"
|
||||
android:layout_alignRight="@+id/textViewInfo"
|
||||
android:layout_alignEnd="@+id/textViewInfo" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/buttonDisConnect"
|
||||
android:onClick="buttonOnClickDisConnect"
|
||||
android:layout_below="@+id/editTextPort"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toLeftOf="@+id/progressBar" />
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignTop="@+id/buttonDisConnect" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:id="@+id/textViewLog"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:typeface="monospace"
|
||||
android:textIsSelectable="true"
|
||||
android:layout_below="@+id/buttonDisConnect" />
|
||||
|
||||
</RelativeLayout>
|
||||
10
remote-reader/app/src/main/res/menu/main.xml
Normal file
10
remote-reader/app/src/main/res/menu/main.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="com.vsmartcard.remotesmartcardreader.app.MainActivity" >
|
||||
|
||||
<item android:id="@+id/action_settings"
|
||||
android:title="@string/action_settings"
|
||||
android:orderInCategory="100"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
||||
6
remote-reader/app/src/main/res/values/dimens.xml
Normal file
6
remote-reader/app/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
|
||||
</resources>
|
||||
33
remote-reader/app/src/main/res/values/strings.xml
Normal file
33
remote-reader/app/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Remote Smart Card Reader</string>
|
||||
|
||||
<string name="button_test_configuration">Connect</string>
|
||||
<string name="button_stop_testing">Disconnect</string>
|
||||
|
||||
<string name="hint_vpcd_port">port</string>
|
||||
<string name="hint_vpcd_hostname">VPCD hostname</string>
|
||||
|
||||
<string name="vpcd_config_info">Settings for <a href="http://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html">remote smart card reader driver (VPCD)</a> of the host computer.</string>
|
||||
|
||||
<string name="status_error">Error</string>
|
||||
<string name="status_disconnected">Disconnected</string>
|
||||
<string name="status_connected_to">Connected to</string>
|
||||
<string name="status_atr">ATR</string>
|
||||
<string name="status_capdu">C-APDU</string>
|
||||
<string name="status_rapdu">R-APDU</string>
|
||||
<string name="status_on">On</string>
|
||||
<string name="status_off">Off</string>
|
||||
<string name="status_reset">Reset</string>
|
||||
<string name="status_unknown">Unknown Event</string>
|
||||
<string name="status_tag_discovered">Contact-less card discovered.</string>
|
||||
<string name="status_dummy_start">Using a dummy card to test the connection.</string>
|
||||
|
||||
<string name="menu_copy_to_clipboard">Copy</string>
|
||||
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="verbose">Verbose logging</string>
|
||||
<string name="error_tag_lost">Data transmission failed. Is the card still present?</string>
|
||||
|
||||
</resources>
|
||||
8
remote-reader/app/src/main/res/values/styles.xml
Normal file
8
remote-reader/app/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
6
remote-reader/app/src/main/res/xml/nfc_tech_filter.xml
Normal file
6
remote-reader/app/src/main/res/xml/nfc_tech_filter.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<tech-list>
|
||||
<!-- catches both, NfcA and NfcB -->
|
||||
<tech>android.nfc.tech.IsoDep</tech>
|
||||
</tech-list>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user