Rewrite of Remote Smart Card Reader

- use material design
- use AsyncTask instead of Runnable for VPCDWorker to integrate with the
  App's lifecycle
- use a dedicated Preference Activity
- integrated zxing's QR code scanner
- use Snackbar instead of Toast
- capture debug messages in log instead of explicitly passing messages
- use reader mode only, breaks support of Android before kitkat
This commit is contained in:
Frank Morgner
2016-04-01 02:27:37 +02:00
parent aa82e78ce7
commit 1d3e5fe4fd
51 changed files with 1624 additions and 717 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#fdd017</color>
</resources>

View File

@@ -1,6 +1,5 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
<dimen name="app_bar_height">180dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<dimen name="text_margin">16dp</dimen>
</resources>

View File

@@ -1,34 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Smart Card Reader</string>
<string name="app_name">Remote Smart Card Reader</string>
<string name="scheme_vpcd">vpcd</string>
<string name="button_test_configuration">Connect</string>
<string name="button_stop_testing">Disconnect</string>
<string name="hint_vpcd_port">VPCD Port</string>
<string name="hint_vpcd_hostname">VPCD Hostname</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. Tap a contact-less card when configured.</string>
<string name="status_error">Error</string>
<string name="status_disconnected">Disconnected from VPCD</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">Powered up the card</string>
<string name="status_off">Powered down the card (cold reset)</string>
<string name="status_reset">Resetted the card (warm reset)</string>
<string name="status_unknown">Unable to perform unknown Event</string>
<string name="status_dummy_start">Using a dummy card to test the connection</string>
<string name="status_default_port">Using default port</string>
<string name="vpcd_config_info">This app connects to the virtual smart card reader driver (VPCD) via the network. You need to install VPCD on your computer and configure the connection parameters here accordingly.</string>
<string-array name="strDelays">
<item>125 milliseconds</item>
<item>250 milliseconds</item>
<item>500 milliseconds</item>
<item>1 second</item>
<item>2 seconds</item>
</string-array>
<string-array name="intDelays">
<item>125</item>
<item>250</item>
<item>500</item>
<item>1000</item>
<item>2000</item>
</string-array>
<string name="action_settings">Settings</string>
<string name="action_copy">Copy Log</string>
<string name="action_delete">Clear Log</string>
<string name="scheme_http">http</string>
<string name="scheme_https">https</string>
<string name="scheme_vpcd">vpcd</string>
<string name="title_activity_settings">Settings</string>
</resources>

View File

@@ -3,6 +3,18 @@
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>