This repository has been archived by the owner on Nov 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial import of KITCard Reader 0.9.
This is the source code of the initial release on Google's Play Store. Signed-off-by: Philipp Kern <[email protected]>
- Loading branch information
0 parents
commit fb4bdfb
Showing
31 changed files
with
870 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="src" path="gen"/> | ||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> | ||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> | ||
<classpathentry kind="output" path="bin/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>KITCard Reader</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.ApkBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="de.Ox539.kitcard.reader" | ||
android:versionCode="8" | ||
android:versionName="0.9" > | ||
|
||
<uses-sdk | ||
android:minSdkVersion="10" | ||
android:targetSdkVersion="15" /> | ||
<uses-permission android:name="android.permission.NFC" /> | ||
<uses-feature android:name="android.hardware.nfc" android:required="true" /> | ||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" /> | ||
|
||
<application | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme" > | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/app_name" > | ||
<meta-data android:name="android.nfc.action.TECH_DISCOVERED" | ||
android:resource="@xml/nfc_tech_filter" /> | ||
<intent-filter> | ||
<category android:name="android.intent.category.DEFAULT"/> | ||
<action android:name="android.nfc.action.TECH_DISCOVERED" /> | ||
</intent-filter> | ||
<intent-filter> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
<action android:name="android.intent.action.MAIN" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Kudos go to Fabian Knittel for his persistence in getting the reverse | ||
engineering done. | ||
|
||
For the app development thanks go to Isabel Slawik and Daniel Lemcke | ||
who gave valuable tips for the design of the app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This file is automatically generated by Android Tools. | ||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED! | ||
# | ||
# This file must be checked in Version Control Systems. | ||
# | ||
# To customize properties used by the Ant build system edit | ||
# "ant.properties", and override values to adapt the script to your | ||
# project structure. | ||
# | ||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): | ||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt | ||
|
||
# Project target. | ||
target=android-14 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<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" > | ||
|
||
<LinearLayout | ||
android:id="@+id/balances_layout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentTop="true" | ||
android:orientation="vertical" | ||
android:paddingLeft="16sp" | ||
android:paddingRight="32sp" | ||
android:paddingTop="16sp" > | ||
|
||
<TextView | ||
android:id="@+id/textView5" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/balance" | ||
android:textAppearance="@style/HeadingTextAppearance" /> | ||
|
||
<TextView | ||
android:id="@+id/balance" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:gravity="right" | ||
android:text="0.00 €" | ||
android:textAppearance="@style/BalanceTextAppearance" /> | ||
|
||
<TextView | ||
android:id="@+id/textView2" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:paddingTop="24sp" | ||
android:text="@string/last_transaction" | ||
android:textAppearance="@style/HeadingTextAppearance" /> | ||
|
||
<TextView | ||
android:id="@+id/lasttransaction" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="right" | ||
android:text="0.00 €" | ||
android:textAppearance="@style/BalanceSmallTextAppearance" /> | ||
</LinearLayout> | ||
|
||
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<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" > | ||
|
||
<LinearLayout | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentTop="true" | ||
android:layout_centerHorizontal="true" | ||
android:orientation="vertical" | ||
android:paddingLeft="16sp" | ||
android:paddingRight="32sp" | ||
android:paddingTop="16sp" > | ||
|
||
<TextView | ||
android:id="@+id/textView5" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/balance" | ||
android:textAppearance="@style/HeadingTextAppearance" /> | ||
|
||
<TextView | ||
android:id="@+id/balance" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:gravity="right" | ||
android:text="0.00 €" | ||
android:textAppearance="@style/BalanceTextAppearance" /> | ||
|
||
<TextView | ||
android:id="@+id/textView2" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:paddingTop="24sp" | ||
android:text="@string/last_transaction" | ||
android:textAppearance="@style/HeadingTextAppearance" /> | ||
|
||
<TextView | ||
android:id="@+id/lasttransaction" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="right" | ||
android:text="0.00 €" | ||
android:textAppearance="@style/BalanceSmallTextAppearance" /> | ||
|
||
<TextView | ||
android:id="@+id/textView6" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:paddingTop="64sp" | ||
android:text="@string/details" | ||
android:textAppearance="@style/HeadingTextAppearance" /> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
android:paddingLeft="16sp" > | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" > | ||
|
||
<TextView | ||
android:id="@+id/textView4" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/card_type" | ||
android:textAppearance="@style/DescriptionTextAppearance" /> | ||
|
||
<TextView | ||
android:id="@+id/card_type" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="right" | ||
android:textAppearance="@style/DescriptionTextAppearance" /> | ||
|
||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" > | ||
|
||
<TextView | ||
android:id="@+id/textView1" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/card_number" | ||
android:textAppearance="@style/DescriptionTextAppearance" /> | ||
|
||
<TextView | ||
android:id="@+id/cardno" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="right" | ||
android:textAppearance="@style/DescriptionTextAppearance" /> | ||
</LinearLayout> | ||
|
||
</LinearLayout> | ||
</LinearLayout> | ||
|
||
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<!-- <item android:id="@+id/menu_settings" | ||
android:title="@string/menu_settings" | ||
android:orderInCategory="100" | ||
android:showAsAction="never" /> --> | ||
</menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<resources> | ||
<string name="app_name">KITCard-Leser</string> | ||
<!-- <string name="menu_settings">Einstellungen</string> --> | ||
|
||
<!-- Main activity --> | ||
<string name="card_number">Kartennummer</string> | ||
<string name="balance">Kontostand</string> | ||
<string name="last_transaction">Letzte Transaktion</string> | ||
<string name="card_type">Kartentyp</string> | ||
<string name="details">Details</string> | ||
|
||
<!-- Card types --> | ||
<string name="student">Student</string> | ||
<string name="employee">Mitarbeiter</string> | ||
<string name="guest">Gast</string> | ||
<string name="unknown">Unbekannt</string> | ||
|
||
<!-- Messages --> | ||
<string name="activate_nfc">Bitte aktiviere NFC und drücke Zurück, um zur Applikation zurückzukehren!</string> | ||
<string name="kitcard_read_failed">Das Lesen der KITCard ist fehlgeschlagen!</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<resources xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<style name="BalanceTextAppearance" parent="@android:style/TextAppearance"> | ||
<item name="android:textSize">96sp</item> | ||
<item name="android:textStyle">bold</item> | ||
</style> | ||
|
||
<style name="BalanceSmallTextAppearance" parent="@android:style/TextAppearance"> | ||
<item name="android:textSize">86sp</item> | ||
</style> | ||
|
||
<style name="DescriptionTextAppearance" parent="@android:style/TextAppearance"> | ||
<item name="android:textSize">20sp</item> | ||
</style> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<resources> | ||
|
||
<style name="AppTheme" parent="android:Theme.Holo" /> | ||
|
||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<resources> | ||
|
||
<style name="AppTheme" parent="android:Theme.Holo" /> | ||
|
||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<resources> | ||
<string name="app_name">KITCard Reader</string> | ||
<!-- <string name="menu_settings">Settings</string> --> | ||
|
||
<!-- Main activity --> | ||
<string name="card_number">Card number</string> | ||
<string name="balance">Balance</string> | ||
<string name="last_transaction">Last transaction</string> | ||
<string name="card_type">Card type</string> | ||
<string name="details">Details</string> | ||
|
||
<!-- Card types --> | ||
<string name="student">Student</string> | ||
<string name="employee">Employee</string> | ||
<string name="guest">Guest</string> | ||
<string name="unknown">Unknown</string> | ||
|
||
<!-- Messages --> | ||
<string name="activate_nfc">Please activate NFC and press Back to return to the application!</string> | ||
<string name="kitcard_read_failed">KITCard reading failed!</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<resources xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<style name="AppTheme" parent="android:Theme.Light"> | ||
<item name="android:textAppearance">@style/BalanceTextAppearance</item> | ||
</style> | ||
|
||
<style name="BalanceTextAppearance" parent="@android:style/TextAppearance"> | ||
<item name="android:textSize">65sp</item> | ||
<item name="android:textStyle">bold</item> | ||
</style> | ||
|
||
<style name="BalanceSmallTextAppearance" parent="@android:style/TextAppearance"> | ||
<item name="android:textSize">50sp</item> | ||
</style> | ||
|
||
<style name="HeadingTextAppearance" parent="@android:style/TextAppearance"> | ||
<item name="android:textAllCaps">true</item> | ||
<item name="android:textSize">20sp</item> | ||
</style> | ||
|
||
<style name="DescriptionTextAppearance" parent="@android:style/TextAppearance"> | ||
<item name="android:textSize">16sp</item> | ||
</style> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> | ||
<tech-list> | ||
<tech>android.nfc.tech.MifareClassic</tech> | ||
<tech>android.nfc.tech.NfcA</tech> | ||
<tech>android.nfc.tech.NdefFormatable</tech> | ||
</tech-list> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package de.Ox539.kitcard.reader; | ||
|
||
import android.content.res.Resources; | ||
|
||
enum CardType { | ||
STUDENT, | ||
EMPLOYEE, | ||
GUEST, | ||
UNKNOWN; | ||
|
||
public String toString(Resources res) { | ||
switch(this) { | ||
case STUDENT: | ||
return res.getString(R.string.student); | ||
case EMPLOYEE: | ||
return res.getString(R.string.employee); | ||
case GUEST: | ||
return res.getString(R.string.guest); | ||
default: | ||
return res.getString(R.string.unknown); | ||
} | ||
} | ||
} |
Oops, something went wrong.