Skip to content

Commit c3003ab

Browse files
committed
added nfc and felica exercise.
1 parent a8525fe commit c3003ab

28 files changed

+3018
-0
lines changed

.gitignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
*.class
2+
*.log
3+
4+
# sbt specific
5+
dist/*
6+
target/
7+
lib_managed/
8+
src_managed/
9+
project/boot/
10+
project/plugins/project/
11+
tmp/
12+
13+
# Scala-IDE specific
14+
.scala_dependencies
15+
.ensime
16+
17+
# built application files
18+
*.apk
19+
*.ap_
20+
21+
# files for the dex VM
22+
*.dex
23+
24+
# Java class files
25+
*.class
26+
27+
# generated files
28+
bin/
29+
gen/
30+
31+
# Local configuration file (sdk path, etc)
32+
local.properties
33+
.manager

nfc-and-felica/.classpath

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" path="gen"/>
5+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
7+
<classpathentry kind="lib" path="jars/MFCUtility.jar"/>
8+
<classpathentry kind="output" path="bin/classes"/>
9+
</classpath>

nfc-and-felica/.project

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>NFC-and-Felica</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.jdt.core.javabuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
31+
<nature>org.eclipse.jdt.core.javanature</nature>
32+
</natures>
33+
</projectDescription>

nfc-and-felica/AndroidManifest.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="net.yuki24.exercise.nfc"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk android:minSdkVersion="10" />
8+
9+
<application
10+
android:icon="@drawable/ic_launcher"
11+
android:label="@string/app_name" >
12+
<activity
13+
android:name=".NfcActivity"
14+
android:label="@string/app_name" >
15+
<intent-filter>
16+
<action android:name="android.intent.action.MAIN" />
17+
18+
<category android:name="android.intent.category.LAUNCHER" />
19+
</intent-filter>
20+
</activity>
21+
</application>
22+
23+
</manifest>

nfc-and-felica/proguard.cfg

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
-optimizationpasses 5
2+
-dontusemixedcaseclassnames
3+
-dontskipnonpubliclibraryclasses
4+
-dontpreverify
5+
-verbose
6+
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
7+
8+
-keep public class * extends android.app.Activity
9+
-keep public class * extends android.app.Application
10+
-keep public class * extends android.app.Service
11+
-keep public class * extends android.content.BroadcastReceiver
12+
-keep public class * extends android.content.ContentProvider
13+
-keep public class * extends android.app.backup.BackupAgentHelper
14+
-keep public class * extends android.preference.Preference
15+
-keep public class com.android.vending.licensing.ILicensingService
16+
17+
-keepclasseswithmembernames class * {
18+
native <methods>;
19+
}
20+
21+
-keepclasseswithmembers class * {
22+
public <init>(android.content.Context, android.util.AttributeSet);
23+
}
24+
25+
-keepclasseswithmembers class * {
26+
public <init>(android.content.Context, android.util.AttributeSet, int);
27+
}
28+
29+
-keepclassmembers class * extends android.app.Activity {
30+
public void *(android.view.View);
31+
}
32+
33+
-keepclassmembers enum * {
34+
public static **[] values();
35+
public static ** valueOf(java.lang.String);
36+
}
37+
38+
-keep class * implements android.os.Parcelable {
39+
public static final android.os.Parcelable$Creator *;
40+
}

nfc-and-felica/project.properties

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system use,
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
10+
# Project target.
11+
target=android-10
4.05 KB
Loading
1.68 KB
Loading
2.51 KB
Loading

nfc-and-felica/res/layout/main.xml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="fill_parent"
4+
android:layout_height="fill_parent"
5+
android:orientation="vertical" >
6+
7+
<TextView
8+
android:layout_width="fill_parent"
9+
android:layout_height="wrap_content"
10+
android:text="@string/hello" />
11+
12+
</LinearLayout>

nfc-and-felica/res/values/strings.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<string name="hello">Hello World, NfcActivity!</string>
5+
<string name="app_name">NFC-and-Felica</string>
6+
7+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS,
8+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
* See the License for the specific language governing permissions and
10+
* limitations under the License.
11+
*/
12+
package net.kazzz.felica;
13+
14+
/**
15+
* FeliCa 例外クラスを提供します
16+
*
17+
* @author Kazzz
18+
* @date 2011/01/21
19+
* @since Android API Level 9
20+
*
21+
*/
22+
23+
public class FeliCaException extends Exception {
24+
private static final long serialVersionUID = 1L;
25+
/**
26+
* コンストラクタ
27+
* @param message メッセージをセット
28+
*/
29+
public FeliCaException(String message) {
30+
super(message);
31+
}
32+
/**
33+
* コンストラクタ
34+
* @param cause 元の例外をセット
35+
*/
36+
public FeliCaException(Exception cause) {
37+
super(cause);
38+
}
39+
}

0 commit comments

Comments
 (0)