summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgoblin911 <[email protected]>2013-08-25 07:52:49 +0800
committergoblin911 <[email protected]>2013-08-25 07:52:49 +0800
commit1c89054353cc6b1ff8e5849561d548b9648946d1 (patch)
tree8459f2269079f7065524f3f057c231d68791b874
parent0f3318eba61d5c2975ed844659995e8f1ec2b1a9 (diff)
new project!
-rw-r--r--client/Piztor/.classpath (renamed from client/activity-demo/Piztor/.classpath)4
-rw-r--r--client/Piztor/.project (renamed from client/activity-demo/Piztor/.project)0
-rw-r--r--client/Piztor/.settings/org.eclipse.jdt.core.prefs (renamed from client/activity-demo/Piztor/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--client/Piztor/AndroidManifest.xml (renamed from client/activity-demo/Piztor/AndroidManifest.xml)21
-rw-r--r--client/Piztor/bin/AndroidManifest.xml (renamed from client/activity-demo/Piztor/bin/AndroidManifest.xml)21
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/ActMgr.classbin0 -> 2616 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/ActStatus.classbin0 -> 328 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/AppMgr$ActivityStatus.classbin0 -> 1412 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/AppMgr.classbin0 -> 2846 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/BuildConfig.classbin0 -> 347 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/EmptyStatus.classbin0 -> 471 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/InitAct.classbin0 -> 804 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/PiztorAct.classbin0 -> 2205 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/R$attr.classbin0 -> 343 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/R$dimen.classbin0 -> 464 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/R$drawable.classbin0 -> 410 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/R$id.classbin0 -> 396 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/R$layout.classbin0 -> 406 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/R$menu.classbin0 -> 419 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/R$string.classbin0 -> 518 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/R$style.classbin0 -> 434 bytes
-rw-r--r--client/Piztor/bin/classes/com/macaroon/piztor/R.classbin0 -> 683 bytes
-rw-r--r--client/Piztor/gen/com/macaroon/piztor/BuildConfig.java (renamed from client/activity-demo/Piztor/gen/com/example/piztor/BuildConfig.java)2
-rw-r--r--client/Piztor/gen/com/macaroon/piztor/R.java (renamed from client/activity-demo/Piztor/gen/com/example/piztor/R.java)22
-rw-r--r--client/Piztor/ic_launcher-web.png (renamed from client/activity-demo/Piztor/ic_launcher-web.png)bin51394 -> 51394 bytes
-rw-r--r--client/Piztor/libs/android-support-v4.jar (renamed from client/activity-demo/Piztor/libs/android-support-v4.jar)bin556198 -> 556198 bytes
-rw-r--r--client/Piztor/proguard-project.txt (renamed from client/activity-demo/Piztor/proguard-project.txt)0
-rw-r--r--client/Piztor/project.properties (renamed from client/activity-demo/Piztor/project.properties)0
-rw-r--r--client/Piztor/res/drawable-hdpi/ic_launcher.png (renamed from client/activity-demo/Piztor/res/drawable-hdpi/ic_launcher.png)bin7658 -> 7658 bytes
-rw-r--r--client/Piztor/res/drawable-mdpi/ic_launcher.png (renamed from client/activity-demo/Piztor/res/drawable-mdpi/ic_launcher.png)bin3777 -> 3777 bytes
-rw-r--r--client/Piztor/res/drawable-xhdpi/ic_launcher.png (renamed from client/activity-demo/Piztor/res/drawable-xhdpi/ic_launcher.png)bin12516 -> 12516 bytes
-rw-r--r--client/Piztor/res/drawable-xxhdpi/ic_launcher.png (renamed from client/activity-demo/Piztor/res/drawable-xxhdpi/ic_launcher.png)bin24777 -> 24777 bytes
-rw-r--r--client/Piztor/res/layout/activity_init.xml16
-rw-r--r--client/Piztor/res/menu/init.xml (renamed from client/activity-demo/Piztor/res/menu/main.xml)0
-rw-r--r--client/Piztor/res/menu/main.xml (renamed from client/activity-demo/Piztor/res/menu/running.xml)0
-rw-r--r--client/Piztor/res/values-sw600dp/dimens.xml (renamed from client/activity-demo/Piztor/res/values-sw600dp/dimens.xml)0
-rw-r--r--client/Piztor/res/values-sw720dp-land/dimens.xml (renamed from client/activity-demo/Piztor/res/values-sw720dp-land/dimens.xml)0
-rw-r--r--client/Piztor/res/values-v11/styles.xml (renamed from client/activity-demo/Piztor/res/values-v11/styles.xml)0
-rw-r--r--client/Piztor/res/values-v14/styles.xml (renamed from client/activity-demo/Piztor/res/values-v14/styles.xml)0
-rw-r--r--client/Piztor/res/values/dimens.xml (renamed from client/activity-demo/Piztor/res/values/dimens.xml)0
-rw-r--r--client/Piztor/res/values/strings.xml (renamed from client/activity-demo/Piztor/res/values/strings.xml)2
-rw-r--r--client/Piztor/res/values/styles.xml (renamed from client/activity-demo/Piztor/res/values/styles.xml)0
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ActMgr.java63
-rw-r--r--client/Piztor/src/com/macaroon/piztor/AppMgr.java62
-rw-r--r--client/Piztor/src/com/macaroon/piztor/InitAct.java22
-rw-r--r--client/Piztor/src/com/macaroon/piztor/PiztorAct.java60
-rw-r--r--client/activity-demo/Piztor.rarbin7055093 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/Piztor.apkbin3698280 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes.dexbin643176 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/BuildConfig.classbin345 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/Controller.classbin1527 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker$1.classbin1184 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker$2.classbin854 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker.classbin4470 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/Login.classbin774 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/MainActivity$1.classbin2289 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/MainActivity.classbin3198 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/MyView.classbin3669 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/Myrequest.classbin549 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/Myrespond.classbin502 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/R$attr.classbin340 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/R$dimen.classbin461 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/R$drawable.classbin435 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/R$id.classbin568 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/R$layout.classbin443 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/R$menu.classbin419 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/R$string.classbin518 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/R$style.classbin431 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/R.classbin673 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/Rmsg.classbin438 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/Running.classbin2264 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/SocketClient.classbin4046 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/Tracker$GPSTask.classbin1292 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/Tracker.classbin1099 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$1.classbin1655 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$Timertk.classbin1102 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$thd.classbin2127 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam.classbin2082 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/dexedLibs/android-support-v4-47342e257aecfcb7fb303475c203fee3.jarbin211326 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/dexedLibs/android-support-v4-6b57c516e4d1603db1d416c633a3e0a1.jarbin211326 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/jarlist.cache3
-rw-r--r--client/activity-demo/Piztor/bin/res/drawable-hdpi/ic_launcher.pngbin5964 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/res/drawable-mdpi/ic_launcher.pngbin3112 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/res/drawable-xhdpi/ic_launcher.pngbin9355 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/res/drawable-xxhdpi/ic_launcher.pngbin17889 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/bin/resources.ap_bin3475320 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/data.jpgbin686402 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/res/drawable-hdpi/data.jpgbin686402 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/res/drawable-ldpi/data.jpgbin686402 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/res/drawable-mdpi/data.jpgbin686402 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/res/drawable-xhdpi/data.jpgbin686402 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/res/drawable-xxhdpi/data.jpgbin686402 -> 0 bytes
-rw-r--r--client/activity-demo/Piztor/res/layout/activity_main.xml44
-rw-r--r--client/activity-demo/Piztor/res/layout/activity_running.xml14
-rw-r--r--client/activity-demo/Piztor/src/com/example/piztor/Controller.java29
-rw-r--r--client/activity-demo/Piztor/src/com/example/piztor/GPSTracker.java206
-rw-r--r--client/activity-demo/Piztor/src/com/example/piztor/Login.java20
-rw-r--r--client/activity-demo/Piztor/src/com/example/piztor/MainActivity.java117
-rw-r--r--client/activity-demo/Piztor/src/com/example/piztor/MyView.java99
-rw-r--r--client/activity-demo/Piztor/src/com/example/piztor/Myrequest.java10
-rw-r--r--client/activity-demo/Piztor/src/com/example/piztor/Myrespond.java12
-rw-r--r--client/activity-demo/Piztor/src/com/example/piztor/Rmsg.java12
-rw-r--r--client/activity-demo/Piztor/src/com/example/piztor/Running.java44
-rw-r--r--client/activity-demo/Piztor/src/com/example/piztor/SocketClient.java113
-rw-r--r--client/activity-demo/Piztor/src/com/example/piztor/Tracker.java41
-rw-r--r--client/activity-demo/Piztor/src/com/example/piztor/Transam.java126
106 files changed, 254 insertions, 931 deletions
diff --git a/client/activity-demo/Piztor/.classpath b/client/Piztor/.classpath
index 5176974..7bc01d9 100644
--- a/client/activity-demo/Piztor/.classpath
+++ b/client/Piztor/.classpath
@@ -1,9 +1,9 @@
<?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 exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
diff --git a/client/activity-demo/Piztor/.project b/client/Piztor/.project
index 97100ec..97100ec 100644
--- a/client/activity-demo/Piztor/.project
+++ b/client/Piztor/.project
diff --git a/client/activity-demo/Piztor/.settings/org.eclipse.jdt.core.prefs b/client/Piztor/.settings/org.eclipse.jdt.core.prefs
index b080d2d..b080d2d 100644
--- a/client/activity-demo/Piztor/.settings/org.eclipse.jdt.core.prefs
+++ b/client/Piztor/.settings/org.eclipse.jdt.core.prefs
diff --git a/client/activity-demo/Piztor/AndroidManifest.xml b/client/Piztor/AndroidManifest.xml
index 10e170f..63cb8ff 100644
--- a/client/activity-demo/Piztor/AndroidManifest.xml
+++ b/client/Piztor/AndroidManifest.xml
@@ -1,17 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.example.piztor"
+ package="com.macaroon.piztor"
android:versionCode="1"
android:versionName="1.0" >
-
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
- <uses-permission android:name="android.permission.WAKE_LOCK"/>
- <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-sdk
- android:minSdkVersion="9"
+ android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
@@ -20,7 +14,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
- android:name="com.example.piztor.MainActivity"
+ android:name="com.macaroon.piztor.Main"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -29,8 +23,13 @@
</intent-filter>
</activity>
<activity
- android:name="com.example.piztor.Running"
- android:label="@string/title_activity_running" >
+ android:name="com.macaroon.piztor.InitAct"
+ android:label="@string/title_activity_init" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
</activity>
</application>
diff --git a/client/activity-demo/Piztor/bin/AndroidManifest.xml b/client/Piztor/bin/AndroidManifest.xml
index 10e170f..63cb8ff 100644
--- a/client/activity-demo/Piztor/bin/AndroidManifest.xml
+++ b/client/Piztor/bin/AndroidManifest.xml
@@ -1,17 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.example.piztor"
+ package="com.macaroon.piztor"
android:versionCode="1"
android:versionName="1.0" >
-
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
- <uses-permission android:name="android.permission.WAKE_LOCK"/>
- <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-sdk
- android:minSdkVersion="9"
+ android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
@@ -20,7 +14,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
- android:name="com.example.piztor.MainActivity"
+ android:name="com.macaroon.piztor.Main"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -29,8 +23,13 @@
</intent-filter>
</activity>
<activity
- android:name="com.example.piztor.Running"
- android:label="@string/title_activity_running" >
+ android:name="com.macaroon.piztor.InitAct"
+ android:label="@string/title_activity_init" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
</activity>
</application>
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/ActMgr.class b/client/Piztor/bin/classes/com/macaroon/piztor/ActMgr.class
new file mode 100644
index 0000000..1b1c693
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/ActMgr.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/ActStatus.class b/client/Piztor/bin/classes/com/macaroon/piztor/ActStatus.class
new file mode 100644
index 0000000..1f3df48
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/ActStatus.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/AppMgr$ActivityStatus.class b/client/Piztor/bin/classes/com/macaroon/piztor/AppMgr$ActivityStatus.class
new file mode 100644
index 0000000..496344b
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/AppMgr$ActivityStatus.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/AppMgr.class b/client/Piztor/bin/classes/com/macaroon/piztor/AppMgr.class
new file mode 100644
index 0000000..107bcad
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/AppMgr.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/BuildConfig.class b/client/Piztor/bin/classes/com/macaroon/piztor/BuildConfig.class
new file mode 100644
index 0000000..566eb01
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/BuildConfig.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/EmptyStatus.class b/client/Piztor/bin/classes/com/macaroon/piztor/EmptyStatus.class
new file mode 100644
index 0000000..c656689
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/EmptyStatus.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/InitAct.class b/client/Piztor/bin/classes/com/macaroon/piztor/InitAct.class
new file mode 100644
index 0000000..6a8e04d
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/InitAct.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/PiztorAct.class b/client/Piztor/bin/classes/com/macaroon/piztor/PiztorAct.class
new file mode 100644
index 0000000..4a3fc81
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/PiztorAct.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/R$attr.class b/client/Piztor/bin/classes/com/macaroon/piztor/R$attr.class
new file mode 100644
index 0000000..a95e1ab
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/R$attr.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/R$dimen.class b/client/Piztor/bin/classes/com/macaroon/piztor/R$dimen.class
new file mode 100644
index 0000000..4bc657f
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/R$dimen.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/R$drawable.class b/client/Piztor/bin/classes/com/macaroon/piztor/R$drawable.class
new file mode 100644
index 0000000..5444d98
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/R$drawable.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/R$id.class b/client/Piztor/bin/classes/com/macaroon/piztor/R$id.class
new file mode 100644
index 0000000..8577179
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/R$id.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/R$layout.class b/client/Piztor/bin/classes/com/macaroon/piztor/R$layout.class
new file mode 100644
index 0000000..fab7556
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/R$layout.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/R$menu.class b/client/Piztor/bin/classes/com/macaroon/piztor/R$menu.class
new file mode 100644
index 0000000..cec6e5a
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/R$menu.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/R$string.class b/client/Piztor/bin/classes/com/macaroon/piztor/R$string.class
new file mode 100644
index 0000000..a78c834
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/R$string.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/R$style.class b/client/Piztor/bin/classes/com/macaroon/piztor/R$style.class
new file mode 100644
index 0000000..42ddcce
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/R$style.class
Binary files differ
diff --git a/client/Piztor/bin/classes/com/macaroon/piztor/R.class b/client/Piztor/bin/classes/com/macaroon/piztor/R.class
new file mode 100644
index 0000000..d173856
--- /dev/null
+++ b/client/Piztor/bin/classes/com/macaroon/piztor/R.class
Binary files differ
diff --git a/client/activity-demo/Piztor/gen/com/example/piztor/BuildConfig.java b/client/Piztor/gen/com/macaroon/piztor/BuildConfig.java
index e2a8a2d..833e650 100644
--- a/client/activity-demo/Piztor/gen/com/example/piztor/BuildConfig.java
+++ b/client/Piztor/gen/com/macaroon/piztor/BuildConfig.java
@@ -1,5 +1,5 @@
/** Automatically generated file. DO NOT MODIFY */
-package com.example.piztor;
+package com.macaroon.piztor;
public final class BuildConfig {
public final static boolean DEBUG = true;
diff --git a/client/activity-demo/Piztor/gen/com/example/piztor/R.java b/client/Piztor/gen/com/macaroon/piztor/R.java
index 6e48ffd..9821c7f 100644
--- a/client/activity-demo/Piztor/gen/com/example/piztor/R.java
+++ b/client/Piztor/gen/com/macaroon/piztor/R.java
@@ -5,7 +5,7 @@
* should not be modified by hand.
*/
-package com.example.piztor;
+package com.macaroon.piztor;
public final class R {
public static final class attr {
@@ -21,31 +21,23 @@ public final class R {
public static final int activity_vertical_margin=0x7f040001;
}
public static final class drawable {
- public static final int data=0x7f020000;
- public static final int ic_launcher=0x7f020001;
+ public static final int ic_launcher=0x7f020000;
}
public static final class id {
- public static final int action_settings=0x7f080006;
- public static final int ip=0x7f080003;
- public static final int login=0x7f080002;
- public static final int password=0x7f080001;
- public static final int port=0x7f080004;
- public static final int username=0x7f080000;
- public static final int view=0x7f080005;
+ public static final int action_settings=0x7f080000;
}
public static final class layout {
- public static final int activity_main=0x7f030000;
- public static final int activity_running=0x7f030001;
+ public static final int activity_init=0x7f030000;
}
public static final class menu {
- public static final int main=0x7f070000;
- public static final int running=0x7f070001;
+ public static final int init=0x7f070000;
+ public static final int main=0x7f070001;
}
public static final class string {
public static final int action_settings=0x7f050001;
public static final int app_name=0x7f050000;
public static final int hello_world=0x7f050002;
- public static final int title_activity_running=0x7f050003;
+ public static final int title_activity_init=0x7f050003;
}
public static final class style {
/**
diff --git a/client/activity-demo/Piztor/ic_launcher-web.png b/client/Piztor/ic_launcher-web.png
index a18cbb4..a18cbb4 100644
--- a/client/activity-demo/Piztor/ic_launcher-web.png
+++ b/client/Piztor/ic_launcher-web.png
Binary files differ
diff --git a/client/activity-demo/Piztor/libs/android-support-v4.jar b/client/Piztor/libs/android-support-v4.jar
index cf12d28..cf12d28 100644
--- a/client/activity-demo/Piztor/libs/android-support-v4.jar
+++ b/client/Piztor/libs/android-support-v4.jar
Binary files differ
diff --git a/client/activity-demo/Piztor/proguard-project.txt b/client/Piztor/proguard-project.txt
index f2fe155..f2fe155 100644
--- a/client/activity-demo/Piztor/proguard-project.txt
+++ b/client/Piztor/proguard-project.txt
diff --git a/client/activity-demo/Piztor/project.properties b/client/Piztor/project.properties
index ce39f2d..ce39f2d 100644
--- a/client/activity-demo/Piztor/project.properties
+++ b/client/Piztor/project.properties
diff --git a/client/activity-demo/Piztor/res/drawable-hdpi/ic_launcher.png b/client/Piztor/res/drawable-hdpi/ic_launcher.png
index 288b665..288b665 100644
--- a/client/activity-demo/Piztor/res/drawable-hdpi/ic_launcher.png
+++ b/client/Piztor/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/client/activity-demo/Piztor/res/drawable-mdpi/ic_launcher.png b/client/Piztor/res/drawable-mdpi/ic_launcher.png
index 6ae570b..6ae570b 100644
--- a/client/activity-demo/Piztor/res/drawable-mdpi/ic_launcher.png
+++ b/client/Piztor/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/client/activity-demo/Piztor/res/drawable-xhdpi/ic_launcher.png b/client/Piztor/res/drawable-xhdpi/ic_launcher.png
index d4fb7cd..d4fb7cd 100644
--- a/client/activity-demo/Piztor/res/drawable-xhdpi/ic_launcher.png
+++ b/client/Piztor/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/client/activity-demo/Piztor/res/drawable-xxhdpi/ic_launcher.png b/client/Piztor/res/drawable-xxhdpi/ic_launcher.png
index 85a6081..85a6081 100644
--- a/client/activity-demo/Piztor/res/drawable-xxhdpi/ic_launcher.png
+++ b/client/Piztor/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/client/Piztor/res/layout/activity_init.xml b/client/Piztor/res/layout/activity_init.xml
new file mode 100644
index 0000000..43e6253
--- /dev/null
+++ b/client/Piztor/res/layout/activity_init.xml
@@ -0,0 +1,16 @@
+<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:paddingBottom="@dimen/activity_vertical_margin"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="@dimen/activity_vertical_margin"
+ tools:context=".InitAct" >
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/hello_world" />
+
+</RelativeLayout>
diff --git a/client/activity-demo/Piztor/res/menu/main.xml b/client/Piztor/res/menu/init.xml
index c002028..c002028 100644
--- a/client/activity-demo/Piztor/res/menu/main.xml
+++ b/client/Piztor/res/menu/init.xml
diff --git a/client/activity-demo/Piztor/res/menu/running.xml b/client/Piztor/res/menu/main.xml
index c002028..c002028 100644
--- a/client/activity-demo/Piztor/res/menu/running.xml
+++ b/client/Piztor/res/menu/main.xml
diff --git a/client/activity-demo/Piztor/res/values-sw600dp/dimens.xml b/client/Piztor/res/values-sw600dp/dimens.xml
index 44f01db..44f01db 100644
--- a/client/activity-demo/Piztor/res/values-sw600dp/dimens.xml
+++ b/client/Piztor/res/values-sw600dp/dimens.xml
diff --git a/client/activity-demo/Piztor/res/values-sw720dp-land/dimens.xml b/client/Piztor/res/values-sw720dp-land/dimens.xml
index 61e3fa8..61e3fa8 100644
--- a/client/activity-demo/Piztor/res/values-sw720dp-land/dimens.xml
+++ b/client/Piztor/res/values-sw720dp-land/dimens.xml
diff --git a/client/activity-demo/Piztor/res/values-v11/styles.xml b/client/Piztor/res/values-v11/styles.xml
index 3c02242..3c02242 100644
--- a/client/activity-demo/Piztor/res/values-v11/styles.xml
+++ b/client/Piztor/res/values-v11/styles.xml
diff --git a/client/activity-demo/Piztor/res/values-v14/styles.xml b/client/Piztor/res/values-v14/styles.xml
index a91fd03..a91fd03 100644
--- a/client/activity-demo/Piztor/res/values-v14/styles.xml
+++ b/client/Piztor/res/values-v14/styles.xml
diff --git a/client/activity-demo/Piztor/res/values/dimens.xml b/client/Piztor/res/values/dimens.xml
index 55c1e59..55c1e59 100644
--- a/client/activity-demo/Piztor/res/values/dimens.xml
+++ b/client/Piztor/res/values/dimens.xml
diff --git a/client/activity-demo/Piztor/res/values/strings.xml b/client/Piztor/res/values/strings.xml
index e837025..8e76dc0 100644
--- a/client/activity-demo/Piztor/res/values/strings.xml
+++ b/client/Piztor/res/values/strings.xml
@@ -4,6 +4,6 @@
<string name="app_name">Piztor</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Hello world!</string>
- <string name="title_activity_running">Running</string>
+ <string name="title_activity_init">InitAct</string>
</resources>
diff --git a/client/activity-demo/Piztor/res/values/styles.xml b/client/Piztor/res/values/styles.xml
index 6ce89c7..6ce89c7 100644
--- a/client/activity-demo/Piztor/res/values/styles.xml
+++ b/client/Piztor/res/values/styles.xml
diff --git a/client/Piztor/src/com/macaroon/piztor/ActMgr.java b/client/Piztor/src/com/macaroon/piztor/ActMgr.java
new file mode 100644
index 0000000..81fa6f2
--- /dev/null
+++ b/client/Piztor/src/com/macaroon/piztor/ActMgr.java
@@ -0,0 +1,63 @@
+package com.macaroon.piztor;
+
+import java.util.*;
+
+import android.annotation.SuppressLint;
+
+@SuppressLint("UseSparseArrays")
+public class ActMgr {
+ // event
+ PiztorAct act;
+ ActStatus nowStatus;
+ HashMap<ActStatus, HashMap<Integer, ActStatus>> mp;
+
+ ActMgr(PiztorAct act, ActStatus nowStatus, ActStatus[] r) {
+ this.act = act;
+ this.nowStatus = nowStatus;
+ mp = new HashMap<ActStatus, HashMap<Integer, ActStatus>>();
+ for (int i = 0; i < r.length; i++) {
+ mp.put(r[i], new HashMap<Integer, ActStatus>());
+ }
+ }
+
+ void trigger(int event) {
+ for (Integer i : mp.get(nowStatus).keySet())
+ System.out.println(i);
+ if (mp.get(nowStatus).containsKey(event)) {
+ nowStatus.leave(event);
+ nowStatus = mp.get(nowStatus).get(event);
+ nowStatus.enter(event);
+ } else if (AppMgr.mp.get(act.getClass()).containsKey(event)) {
+ AppMgr.trigger(event);
+ }
+ }
+
+ void add(ActStatus a, int event, ActStatus b) {
+ if (mp.containsKey(a)) {
+ HashMap<Integer, ActStatus> h = mp.get(a);
+ h.put(event, b);
+ mp.put(a, h);
+ } else {
+ HashMap<Integer, ActStatus> h = new HashMap<Integer, ActStatus>();
+ h.put(event, b);
+ mp.put(a, h);
+ }
+ }
+}
+
+abstract class ActStatus {
+ abstract void enter(int e);
+
+ abstract void leave(int e);
+}
+
+class EmptyStatus extends ActStatus {
+ @Override
+ void enter(int e) {
+ }
+
+ @Override
+ void leave(int e) {
+ }
+
+}
diff --git a/client/Piztor/src/com/macaroon/piztor/AppMgr.java b/client/Piztor/src/com/macaroon/piztor/AppMgr.java
new file mode 100644
index 0000000..9259786
--- /dev/null
+++ b/client/Piztor/src/com/macaroon/piztor/AppMgr.java
@@ -0,0 +1,62 @@
+package com.macaroon.piztor;
+
+import java.util.HashMap;
+
+import android.annotation.SuppressLint;
+import android.content.Intent;
+
+@SuppressLint("UseSparseArrays")
+public class AppMgr {
+ // Status
+ public enum ActivityStatus{
+ create, start, resume, restart, stop, pause, destroy
+ }
+ static ActivityStatus status;
+ static PiztorAct nowAct;
+
+ static HashMap<Class<?>, HashMap<Integer, Class<?>>> mp;
+
+ static void setStatus(ActivityStatus st) {
+ status = st;
+ }
+
+ static void trigger(int event) {
+
+ Intent i = new Intent();
+ i.setClass(nowAct, mp.get(nowAct.getClass()).get(event));
+ nowAct.startActivity(i);
+ }
+
+ static void add(Class<?> a, Integer event, Class<?> b) {
+ if (mp.containsKey(a))
+ mp.get(a).put(event, b);
+ else {
+ HashMap<Integer, Class<?>> h = new HashMap<Integer, Class<?>>();
+ h.put(event, b);
+ mp.put(a, h);
+ }
+ }
+
+ static void addTransition(Class<?> a, int i, Class<?> b) {
+ if (mp.containsKey(a)) {
+ HashMap<Integer, Class<?>> h = mp.get(a);
+ h.put(i, b);
+ mp.put(a, h);
+ } else {
+ HashMap<Integer, Class<?>> h = new HashMap<Integer, Class<?>>();
+ h.put(i, b);
+ mp.put(a, h);
+ }
+ }
+
+ static void addStatus(Class<?> a) {
+ mp.put(a, new HashMap<Integer, Class<?>>());
+ }
+
+ static void init() {
+ mp = new HashMap<Class<?>, HashMap<Integer, Class<?>>>();
+ addStatus(InitAct.class);
+
+ }
+
+}
diff --git a/client/Piztor/src/com/macaroon/piztor/InitAct.java b/client/Piztor/src/com/macaroon/piztor/InitAct.java
new file mode 100644
index 0000000..1ce492c
--- /dev/null
+++ b/client/Piztor/src/com/macaroon/piztor/InitAct.java
@@ -0,0 +1,22 @@
+package com.macaroon.piztor;
+
+import android.os.Bundle;
+import android.app.Activity;
+import android.view.Menu;
+
+public class InitAct extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_init);
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu; this adds items to the action bar if it is present.
+ getMenuInflater().inflate(R.menu.init, menu);
+ return true;
+ }
+
+}
diff --git a/client/Piztor/src/com/macaroon/piztor/PiztorAct.java b/client/Piztor/src/com/macaroon/piztor/PiztorAct.java
new file mode 100644
index 0000000..ad12b17
--- /dev/null
+++ b/client/Piztor/src/com/macaroon/piztor/PiztorAct.java
@@ -0,0 +1,60 @@
+package com.macaroon.piztor;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class PiztorAct extends Activity {
+ String id;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ System.out.println(id + " on create");
+ AppMgr.setStatus(AppMgr.ActivityStatus.create);
+ AppMgr.nowAct = this;
+ }
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+ System.out.println(id + " on start");
+ AppMgr.setStatus(AppMgr.ActivityStatus.start);
+ AppMgr.nowAct = this;
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ System.out.println(id + " on stop");
+ AppMgr.setStatus(AppMgr.ActivityStatus.stop);
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ System.out.println(id + " on resume");
+ AppMgr.setStatus(AppMgr.ActivityStatus.resume);
+ AppMgr.nowAct = this;
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+ System.out.println(id + " on pause");
+ AppMgr.setStatus(AppMgr.ActivityStatus.pause);
+ }
+
+ @Override
+ protected void onRestart() {
+ super.onRestart();
+ System.out.println(id + " on restart");
+ AppMgr.setStatus(AppMgr.ActivityStatus.restart);
+ }
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ System.out.println(id + " on destroy");
+ AppMgr.setStatus(AppMgr.ActivityStatus.destroy);
+ }
+
+}
diff --git a/client/activity-demo/Piztor.rar b/client/activity-demo/Piztor.rar
deleted file mode 100644
index 5ebf80c..0000000
--- a/client/activity-demo/Piztor.rar
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/Piztor.apk b/client/activity-demo/Piztor/bin/Piztor.apk
deleted file mode 100644
index dbb2bb2..0000000
--- a/client/activity-demo/Piztor/bin/Piztor.apk
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes.dex b/client/activity-demo/Piztor/bin/classes.dex
deleted file mode 100644
index d6bef19..0000000
--- a/client/activity-demo/Piztor/bin/classes.dex
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/BuildConfig.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/BuildConfig.class
deleted file mode 100644
index 05d2e99..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/BuildConfig.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Controller.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Controller.class
deleted file mode 100644
index e9b16d2..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Controller.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker$1.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker$1.class
deleted file mode 100644
index 997b8f5..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker$1.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker$2.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker$2.class
deleted file mode 100644
index a01d5ea..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker$2.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker.class
deleted file mode 100644
index ae89879..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Login.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Login.class
deleted file mode 100644
index dd08b6f..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Login.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/MainActivity$1.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/MainActivity$1.class
deleted file mode 100644
index f3e6088..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/MainActivity$1.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/MainActivity.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/MainActivity.class
deleted file mode 100644
index e390cf2..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/MainActivity.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/MyView.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/MyView.class
deleted file mode 100644
index 441b92c..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/MyView.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Myrequest.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Myrequest.class
deleted file mode 100644
index 80893f6..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Myrequest.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Myrespond.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Myrespond.class
deleted file mode 100644
index a475cee..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Myrespond.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$attr.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$attr.class
deleted file mode 100644
index bf7ee98..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$attr.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$dimen.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$dimen.class
deleted file mode 100644
index a0d6549..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$dimen.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$drawable.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$drawable.class
deleted file mode 100644
index 0438e22..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$drawable.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$id.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$id.class
deleted file mode 100644
index 9139bf3..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$id.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$layout.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$layout.class
deleted file mode 100644
index 6be2329..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$layout.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$menu.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$menu.class
deleted file mode 100644
index 714190a..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$menu.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$string.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$string.class
deleted file mode 100644
index d2df448..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$string.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$style.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$style.class
deleted file mode 100644
index 07085b3..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$style.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R.class
deleted file mode 100644
index 178a999..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/R.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Rmsg.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Rmsg.class
deleted file mode 100644
index 9bcd917..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Rmsg.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Running.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Running.class
deleted file mode 100644
index 4ed4b3d..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Running.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/SocketClient.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/SocketClient.class
deleted file mode 100644
index 339dde4..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/SocketClient.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Tracker$GPSTask.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Tracker$GPSTask.class
deleted file mode 100644
index 493b9e2..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Tracker$GPSTask.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Tracker.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Tracker.class
deleted file mode 100644
index c3d6f0c..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Tracker.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$1.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$1.class
deleted file mode 100644
index 91cf629..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$1.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$Timertk.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$Timertk.class
deleted file mode 100644
index 34edfdf..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$Timertk.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$thd.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$thd.class
deleted file mode 100644
index a40ea07..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$thd.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam.class b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam.class
deleted file mode 100644
index a94e978..0000000
--- a/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam.class
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/dexedLibs/android-support-v4-47342e257aecfcb7fb303475c203fee3.jar b/client/activity-demo/Piztor/bin/dexedLibs/android-support-v4-47342e257aecfcb7fb303475c203fee3.jar
deleted file mode 100644
index b263924..0000000
--- a/client/activity-demo/Piztor/bin/dexedLibs/android-support-v4-47342e257aecfcb7fb303475c203fee3.jar
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/dexedLibs/android-support-v4-6b57c516e4d1603db1d416c633a3e0a1.jar b/client/activity-demo/Piztor/bin/dexedLibs/android-support-v4-6b57c516e4d1603db1d416c633a3e0a1.jar
deleted file mode 100644
index 08c0c4b..0000000
--- a/client/activity-demo/Piztor/bin/dexedLibs/android-support-v4-6b57c516e4d1603db1d416c633a3e0a1.jar
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/jarlist.cache b/client/activity-demo/Piztor/bin/jarlist.cache
deleted file mode 100644
index 0565465..0000000
--- a/client/activity-demo/Piztor/bin/jarlist.cache
+++ /dev/null
@@ -1,3 +0,0 @@
-# cache for current jar dependency. DO NOT EDIT.
-# format is <lastModified> <length> <SHA-1> <path>
-# Encoding is UTF-8
diff --git a/client/activity-demo/Piztor/bin/res/drawable-hdpi/ic_launcher.png b/client/activity-demo/Piztor/bin/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index efa7c5f..0000000
--- a/client/activity-demo/Piztor/bin/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/res/drawable-mdpi/ic_launcher.png b/client/activity-demo/Piztor/bin/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index ec27f2e..0000000
--- a/client/activity-demo/Piztor/bin/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/res/drawable-xhdpi/ic_launcher.png b/client/activity-demo/Piztor/bin/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 92fc57d..0000000
--- a/client/activity-demo/Piztor/bin/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/res/drawable-xxhdpi/ic_launcher.png b/client/activity-demo/Piztor/bin/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index b6f8f4e..0000000
--- a/client/activity-demo/Piztor/bin/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/bin/resources.ap_ b/client/activity-demo/Piztor/bin/resources.ap_
deleted file mode 100644
index f0851cf..0000000
--- a/client/activity-demo/Piztor/bin/resources.ap_
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/data.jpg b/client/activity-demo/Piztor/data.jpg
deleted file mode 100644
index f549ec7..0000000
--- a/client/activity-demo/Piztor/data.jpg
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/res/drawable-hdpi/data.jpg b/client/activity-demo/Piztor/res/drawable-hdpi/data.jpg
deleted file mode 100644
index f549ec7..0000000
--- a/client/activity-demo/Piztor/res/drawable-hdpi/data.jpg
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/res/drawable-ldpi/data.jpg b/client/activity-demo/Piztor/res/drawable-ldpi/data.jpg
deleted file mode 100644
index f549ec7..0000000
--- a/client/activity-demo/Piztor/res/drawable-ldpi/data.jpg
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/res/drawable-mdpi/data.jpg b/client/activity-demo/Piztor/res/drawable-mdpi/data.jpg
deleted file mode 100644
index f549ec7..0000000
--- a/client/activity-demo/Piztor/res/drawable-mdpi/data.jpg
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/res/drawable-xhdpi/data.jpg b/client/activity-demo/Piztor/res/drawable-xhdpi/data.jpg
deleted file mode 100644
index f549ec7..0000000
--- a/client/activity-demo/Piztor/res/drawable-xhdpi/data.jpg
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/res/drawable-xxhdpi/data.jpg b/client/activity-demo/Piztor/res/drawable-xxhdpi/data.jpg
deleted file mode 100644
index f549ec7..0000000
--- a/client/activity-demo/Piztor/res/drawable-xxhdpi/data.jpg
+++ /dev/null
Binary files differ
diff --git a/client/activity-demo/Piztor/res/layout/activity_main.xml b/client/activity-demo/Piztor/res/layout/activity_main.xml
deleted file mode 100644
index 075a1f6..0000000
--- a/client/activity-demo/Piztor/res/layout/activity_main.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
-
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- >
-
- <EditText
- android:id="@+id/username"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:inputType="textPersonName" >
-
- <requestFocus />
- </EditText>
-
- <EditText
- android:id="@+id/password"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:inputType="textPassword" />
-
- <Button
- android:id="@+id/login"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="login" />
-
- <EditText
- android:id="@+id/ip"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10" />
-
- <EditText
- android:id="@+id/port"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10" />
-
-</LinearLayout>
diff --git a/client/activity-demo/Piztor/res/layout/activity_running.xml b/client/activity-demo/Piztor/res/layout/activity_running.xml
deleted file mode 100644
index f52531a..0000000
--- a/client/activity-demo/Piztor/res/layout/activity_running.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
-
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- >
-
- <com.example.piztor.MyView
- android:id="@+id/view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/client/activity-demo/Piztor/src/com/example/piztor/Controller.java b/client/activity-demo/Piztor/src/com/example/piztor/Controller.java
deleted file mode 100644
index d6e75d7..0000000
--- a/client/activity-demo/Piztor/src/com/example/piztor/Controller.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.example.piztor;
-
-
-public class Controller {
- String userToken;
- Running run;
-
- Controller() {
- run = null;
- userToken = null;
- }
-
- void setRun(Running run) {
- this.run = run;
- }
-
- void recieveInfo(Myrespond r) {
- if (r.wrong != null) {
- System.out.println(r.wrong);
- } else {
- System.out.println("yeal!");
- }
- }
-
- void recieveLocation(double x, double y) {
- System.out.println(x + " xxxx " + y);
- run.v.changMyLocation(x, y);
- }
-}
diff --git a/client/activity-demo/Piztor/src/com/example/piztor/GPSTracker.java b/client/activity-demo/Piztor/src/com/example/piztor/GPSTracker.java
deleted file mode 100644
index 13cb868..0000000
--- a/client/activity-demo/Piztor/src/com/example/piztor/GPSTracker.java
+++ /dev/null
@@ -1,206 +0,0 @@
-package com.example.piztor;
-
-import android.app.AlertDialog;
-import android.app.Service;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.location.Location;
-import android.location.LocationListener;
-import android.location.LocationManager;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.provider.Settings;
-import android.util.Log;
-
-public class GPSTracker extends Service implements LocationListener {
-
- private final Context mContext;
-
- // flag for GPS status
- boolean isGPSEnabled = false;
-
- // flag for network status
- boolean isNetworkEnabled = false;
-
- // flag for GPS status
- boolean canGetLocation = false;
-
- Location location; // location
- double latitude; // latitude
- double longitude; // longitude
-
- // The minimum distance to change Updates in meters
- private static final long MIN_DISTANCE_CHANGE_FOR_UPDATES = 10; // 10 meters
-
- // The minimum time between updates in milliseconds
- private static final long MIN_TIME_BW_UPDATES = 1000 * 10; // 10 seconds
-
- // Declaring a Location Manager
- protected LocationManager locationManager;
-
- public GPSTracker(Context context) {
- this.mContext = context;
- getLocation();
- }
-
- public Location getLocation() {
- try {
- locationManager = (LocationManager) mContext
- .getSystemService(LOCATION_SERVICE);
-
- // getting GPS status
- isGPSEnabled = locationManager
- .isProviderEnabled(LocationManager.GPS_PROVIDER);
-
- // getting network status
- isNetworkEnabled = locationManager
- .isProviderEnabled(LocationManager.NETWORK_PROVIDER);
-
- if (!isGPSEnabled) {
- // no network provider is enabled
- } else {
- this.canGetLocation = true;
- if (isNetworkEnabled) {
- locationManager.requestLocationUpdates(
- LocationManager.NETWORK_PROVIDER,
- MIN_TIME_BW_UPDATES,
- MIN_DISTANCE_CHANGE_FOR_UPDATES, this);
- Log.d("Network", "Network");
- if (locationManager != null) {
- location = locationManager
- .getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
- if (location != null) {
- latitude = location.getLatitude();
- longitude = location.getLongitude();
- }
- }
- }
- // if GPS Enabled get lat/long using GPS Services
- if (isGPSEnabled) {
- if (location == null) {
- locationManager.requestLocationUpdates(
- LocationManager.GPS_PROVIDER,
- MIN_TIME_BW_UPDATES,
- MIN_DISTANCE_CHANGE_FOR_UPDATES, this);
- Log.d("GPS Enabled", "GPS Enabled");
- if (locationManager != null) {
- location = locationManager
- .getLastKnownLocation(LocationManager.GPS_PROVIDER);
- if (location != null) {
- latitude = location.getLatitude();
- longitude = location.getLongitude();
- }
- }
- }
- }
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- return location;
- }
-
- /**
- * Stop using GPS listener Calling this function will stop using GPS in your
- * app
- * */
- public void stopUsingGPS() {
- if (locationManager != null) {
- locationManager.removeUpdates(GPSTracker.this);
- }
- }
-
- /**
- * Function to get latitude
- * */
- public double getLatitude() {
- if (location != null) {
- latitude = location.getLatitude();
- }
-
- // return latitude
- return latitude;
- }
-
- /**
- * Function to get longitude
- * */
- public double getLongitude() {
- if (location != null) {
- longitude = location.getLongitude();
- }
-
- // return longitude
- return longitude;
- }
-
- /**
- * Function to check GPS/wifi enabled
- *
- * @return boolean
- * */
- public boolean canGetLocation() {
- return this.canGetLocation;
- }
-
- /**
- * Function to show settings alert dialog On pressing Settings button will
- * lauch Settings Options
- * */
- public void showSettingsAlert() {
- AlertDialog.Builder alertDialog = new AlertDialog.Builder(mContext);
-
- // Setting Dialog Title
- alertDialog.setTitle("GPS is settings");
-
- // Setting Dialog Message
- alertDialog
- .setMessage("GPS is not enabled. Do you want to go to settings menu?");
-
- // On pressing Settings button
- alertDialog.setPositiveButton("Settings",
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- Intent intent = new Intent(
- Settings.ACTION_LOCATION_SOURCE_SETTINGS);
- mContext.startActivity(intent);
- }
- });
-
- // on pressing cancel button
- alertDialog.setNegativeButton("Cancel",
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- dialog.cancel();
- }
- });
-
- // Showing Alert Message
- alertDialog.show();
- }
-
- @Override
- public void onLocationChanged(Location location) {
- }
-
- @Override
- public void onProviderDisabled(String provider) {
- }
-
- @Override
- public void onProviderEnabled(String provider) {
- }
-
- @Override
- public void onStatusChanged(String provider, int status, Bundle extras) {
- }
-
- @Override
- public IBinder onBind(Intent arg0) {
- return null;
- }
-
-}
diff --git a/client/activity-demo/Piztor/src/com/example/piztor/Login.java b/client/activity-demo/Piztor/src/com/example/piztor/Login.java
deleted file mode 100644
index de5cded..0000000
--- a/client/activity-demo/Piztor/src/com/example/piztor/Login.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.example.piztor;
-
-public class Login {
- MainActivity main;
- int tk;
-
- Login(MainActivity main) {
- this.main = main;
- }
-
- void success(int token) {
- //main.start();
- tk = token;
- System.out.println("token!");
- }
-
- void failed() {
- System.out.println("fuck!!");
- }
-}
diff --git a/client/activity-demo/Piztor/src/com/example/piztor/MainActivity.java b/client/activity-demo/Piztor/src/com/example/piztor/MainActivity.java
deleted file mode 100644
index 38c6938..0000000
--- a/client/activity-demo/Piztor/src/com/example/piztor/MainActivity.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package com.example.piztor;
-
-import java.io.PrintStream;
-import java.util.Vector;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.Menu;
-import android.view.View;
-import android.widget.Button;
-import android.widget.EditText;
-
-public class MainActivity extends Activity {
- PrintStream cout = System.out;
- Button b;
- EditText username, password, ip, port;
- Login login;
- Controller c;
- boolean flag = false;
- public final static String SER_KEY = "CONTROL";
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- login = new Login(this);
- c = new Controller();
- b = (Button) findViewById(R.id.login);
-
- b.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- if(flag==false){
- Vector<Object> r = new Vector<Object>();
- r.add(0);
- r.add(username.getText().toString());
- r.add(password.getText().toString());
- Transam t = new Transam(ip.getText().toString(), Integer
- .parseInt(port.getText().toString()), new Myrequest(r),
- login);
- new Thread(t).run();
- flag = true;
- }
- else{
- Vector<Object> r = new Vector<Object>();
- r.add(3);
- r.add(login.tk);
- r.add(1);
- Transam t = new Transam(ip.getText().toString(), Integer
- .parseInt(port.getText().toString()), new Myrequest(r),
- c);
- new Thread(t).run();
- }
- }
- });
- username = (EditText) findViewById(R.id.username);
- password = (EditText) findViewById(R.id.password);
- ip = (EditText) findViewById(R.id.ip);
- port = (EditText) findViewById(R.id.port);
- cout.println("onCreate!");
- }
-
- void start() {
- Intent i = new Intent();
- i.setClass(MainActivity.this, Running.class);
- startActivity(i);
- }
-
- @Override
- protected void onStart() {
- super.onStart();
- ip.setText("69.85.86.42");
- port.setText("9990");
- username.setText("hello");
- password.setText("world");
- cout.println("onStart!");
- }
-
- @Override
- protected void onRestart() {
- super.onRestart();
- cout.println("onRestart!");
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- // cout.println("onResume!");
- // v.drawString("!!!!!");
- }
-
- @Override
- protected void onPause() {
- super.onPause();
- cout.println("onPause!");
- }
-
- @Override
- protected void onStop() {
- super.onStop();
- cout.println("onStop!");
- }
-
- @Override
- protected void onDestroy() {
- super.onDestroy();
- cout.println("onDestroy!");
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- // Inflate the menu; this adds items to the action bar if it is present.
- getMenuInflater().inflate(R.menu.main, menu);
- return true;
- }
-
-}
diff --git a/client/activity-demo/Piztor/src/com/example/piztor/MyView.java b/client/activity-demo/Piztor/src/com/example/piztor/MyView.java
deleted file mode 100644
index a213013..0000000
--- a/client/activity-demo/Piztor/src/com/example/piztor/MyView.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package com.example.piztor;
-
-import java.io.PrintStream;
-import java.util.Vector;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.Paint.Style;
-import android.graphics.Point;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
-import android.view.View;
-
-public class MyView extends View {
- static PrintStream cout = System.out;
- private Paint mPaint, oPaint;
- public Canvas c = null;
- public Bitmap b = null;
- public double scale = 1;
- public double centerX, centerY;
-
-
- Point myLocation;
- Vector<Point> Location;
-
- void setup(Canvas c, Bitmap b, double x, double y) {
- this.c = c;
- this.b = b;
- centerX = x;
- centerY = y;
- myLocation = new Point(10, 10);
- Location = new Vector<Point>();
- Location.add(myLocation);
- }
-
- public MyView(Context context) {
- super(context);
- // v = new Vector<PointF>();
- mPaint = new Paint();
- mPaint.setColor(Color.RED);
- mPaint.setStyle(Style.FILL);
- oPaint = new Paint();
- oPaint.setColor(Color.BLUE);
- oPaint.setStyle(Style.FILL);
- }
-
- public MyView(Context context, AttributeSet attr) {
- super(context, attr);
- // v = new Vector<PointF>();
- mPaint = new Paint();
- mPaint.setColor(Color.RED);
- mPaint.setStyle(Style.FILL);
- }
-
- @Override
- protected void onDraw(Canvas canvas) {
- super.onDraw(canvas);
- cout.println(myLocation.x + " -- " + myLocation.y);
- canvas.drawCircle(myLocation.x, myLocation.y, 5, mPaint);
- //canvas.drawBitmap(b, 0, 0, mPaint);
- /*for (int i = 1; i < Location.size(); i++) {
- canvas.drawCircle(Location.get(i).x, Location.get(i).y, 2, oPaint);
- }*/
- // canvas.restore();
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent e) {
- // v.add(new PointF(e.getX(), e.getY()));
- c.drawRect(e.getX() - 1, e.getY() + 1, e.getX() + 1, e.getY() - 1,
- mPaint);
-
- invalidate();
- return true;
- }
-
- void changMyLocation(double x, double y) {
- if (centerX < 0) {
- centerX = x;
- centerY = y;
- }
- int x1 = (int) (getWidth() / 2 + (x - centerX) * scale);
- int y1 = (int) (getHeight() / 2 + (y - centerY) * scale);
- myLocation.x = x1;
- myLocation.y = y1;
- cout.println(x + " " + y);
- invalidate();
- }
-
- void drawString(String s) {
- mPaint.setTextSize(15);
- c.drawText(s, 0, getHeight() / 2, mPaint);
- invalidate();
- }
-
-} \ No newline at end of file
diff --git a/client/activity-demo/Piztor/src/com/example/piztor/Myrequest.java b/client/activity-demo/Piztor/src/com/example/piztor/Myrequest.java
deleted file mode 100644
index 9397e0c..0000000
--- a/client/activity-demo/Piztor/src/com/example/piztor/Myrequest.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.example.piztor;
-
-import java.util.Vector;
-
-public class Myrequest{
- public Vector<Object> contain;
- Myrequest(Vector<Object> info){
- contain = info;
- }
-} \ No newline at end of file
diff --git a/client/activity-demo/Piztor/src/com/example/piztor/Myrespond.java b/client/activity-demo/Piztor/src/com/example/piztor/Myrespond.java
deleted file mode 100644
index 2398f2b..0000000
--- a/client/activity-demo/Piztor/src/com/example/piztor/Myrespond.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.example.piztor;
-
-import java.util.Vector;
-
-public class Myrespond{
- public Vector<Object> contain;
- public String wrong;
- Myrespond(){
- wrong = null;
- contain = new Vector<Object>();
- }
-} \ No newline at end of file
diff --git a/client/activity-demo/Piztor/src/com/example/piztor/Rmsg.java b/client/activity-demo/Piztor/src/com/example/piztor/Rmsg.java
deleted file mode 100644
index 8f4f587..0000000
--- a/client/activity-demo/Piztor/src/com/example/piztor/Rmsg.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.example.piztor;
-
-public class Rmsg{
- int id;
- double lat;
- double lot;
- Rmsg(int i,double l,double ll){
- id = i;
- lat = l;
- lot = ll;
- }
-} \ No newline at end of file
diff --git a/client/activity-demo/Piztor/src/com/example/piztor/Running.java b/client/activity-demo/Piztor/src/com/example/piztor/Running.java
deleted file mode 100644
index f4b6135..0000000
--- a/client/activity-demo/Piztor/src/com/example/piztor/Running.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.example.piztor;
-
-import java.io.PrintStream;
-
-import android.os.Bundle;
-import android.app.Activity;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.view.Menu;
-
-public class Running extends Activity {
- PrintStream cout = System.out;
- MyView v;
- Bitmap b;
- Canvas c;
- Controller controller;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- b = Bitmap.createBitmap(720, 1280, Bitmap.Config.ARGB_8888);
- c = new Canvas(b);
- controller = new Controller();
- controller.setRun(this);
- setContentView(R.layout.activity_running);
- cout.println("running is created!!!");
- }
-
- @Override
- protected void onStart() {
- super.onStart();
- v = (MyView) findViewById(R.id.view);
- v.setup(c, b, -1, -1);
- Tracker tr = new Tracker(controller, Running.this);
- new Thread(tr).run();
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- // Inflate the menu; this adds items to the action bar if it is present.
- getMenuInflater().inflate(R.menu.running, menu);
- return true;
- }
-
-}
diff --git a/client/activity-demo/Piztor/src/com/example/piztor/SocketClient.java b/client/activity-demo/Piztor/src/com/example/piztor/SocketClient.java
deleted file mode 100644
index 472da0d..0000000
--- a/client/activity-demo/Piztor/src/com/example/piztor/SocketClient.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package com.example.piztor;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.net.Socket;
-import java.net.UnknownHostException;
-
-public class SocketClient {
- static PrintStream cout = System.out;
- static Socket client;
-
- public SocketClient(String site, int port) throws UnknownHostException,
- IOException {
- try {
- cout.println(site + " " + port);
- client = new Socket(site, port);
- cout.println("connected successfully!!!");
- } catch (UnknownHostException e) {
- cout.println("unknownhostexception!!");
- throw e;
- } catch (IOException e) {
- cout.println("IOException!!");
- throw e;
- }
- }
-
- public Myrespond sendMsg(Myrequest req) throws IOException {
- try {
- DataOutputStream out = new DataOutputStream(
- client.getOutputStream());
- int tmp = (Integer) req.contain.get(0);
- out.writeByte(tmp);
- switch (tmp) {
- case 0:
- String id = (String) req.contain.get(1);
- String pass = (String) req.contain.get(2);
- out.writeBytes(id + "\0" + pass);
- break;
- case 1:
- int tk1 = (Integer) req.contain.get(1);
- int acc = (Integer) req.contain.get(2);
- String mess = (String) req.contain.get(3);
- out.writeInt(tk1);
- out.writeInt(acc);
- out.writeBytes(mess);
- break;
- case 2:
- int tk2 = (Integer) req.contain.get(1);
- double slot = (Double) req.contain.get(2);
- double slat = (Double) req.contain.get(3);
- out.writeInt(tk2);
- out.writeDouble(slot);
- out.writeDouble(slat);
- break;
- case 3:
- int tk3 = (Integer) req.contain.get(1);
- int gid = (Integer) req.contain.get(2);
- out.writeInt(tk3);
- out.writeInt(gid);
- break;
- }
- out.flush();
- client.shutdownOutput();
- DataInputStream in = new DataInputStream(client.getInputStream());
- int type = in.readUnsignedByte();
- Myrespond r = new Myrespond();
- switch (type) {
- case 0:
- int id = in.readInt();
- int status = in.readUnsignedByte();
- r.contain.add(0);
- r.contain.add(id);
- r.contain.add(status);
- System.out.println(id);
- break;
- case 1:
- r.contain.add(1);
- // reserved
- break;
- case 2:
- r.contain.add(2);
- // reserved
- break;
- case 3:
- int n = in.readInt();
- r.contain.add(3);
- r.contain.add(n);
- for (int i = 1; i <= n; i++) {
- int tid = in.readInt();
- double lat = in.readDouble();
- double lot = in.readDouble();
- Rmsg a = new Rmsg(tid,lat,lot);
- r.contain.add(a);
- }
- break;
- }
- return r;
- } catch (IOException e) {
- throw e;
- }
- }
-
- public void closeSocket() {
- try {
- client.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
-}
diff --git a/client/activity-demo/Piztor/src/com/example/piztor/Tracker.java b/client/activity-demo/Piztor/src/com/example/piztor/Tracker.java
deleted file mode 100644
index 0222325..0000000
--- a/client/activity-demo/Piztor/src/com/example/piztor/Tracker.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.example.piztor;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import android.content.Context;
-
-public class Tracker implements Runnable {
-
- private static final long TIME_DELTA = 1000 * 10; // 10 seconds
- public Timer timer;
- private final Context mContext;
- Controller controller;
-
- public Tracker(Controller newController, Context context) {
- timer = new Timer();
- mContext = context;
- controller = newController;
- }
-
- public void run() {
- GPSTask t = new GPSTask();
- t.run();
- //timer.s
-// timer.schedule(new GPSTask(), 0, TIME_DELTA);
- }
-
- class GPSTask extends TimerTask {
- @Override
- public void run() {
- GPSTracker tracker;
- tracker = new GPSTracker(mContext);
- System.out.println("can get location?");
- if(tracker.canGetLocation()) {
- double latitude = tracker.getLatitude();
- double longitude = tracker.getLongitude();
- System.out.println("yes!");
- controller.recieveLocation(latitude, longitude);
- }
- }
- }
-}
diff --git a/client/activity-demo/Piztor/src/com/example/piztor/Transam.java b/client/activity-demo/Piztor/src/com/example/piztor/Transam.java
deleted file mode 100644
index 50b4186..0000000
--- a/client/activity-demo/Piztor/src/com/example/piztor/Transam.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package com.example.piztor;
-import java.io.IOException;
-import java.net.UnknownHostException;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import android.annotation.SuppressLint;
-import android.os.Handler;
-import android.os.Message;
-
-public class Transam implements Runnable {
- public Timer timer;
- public boolean flag = true;
- public boolean reqlog = false;
- public int cnt = 2;
- public int port;
- public String ip;
- Thread thread;
- Myrequest req;
- Myrespond res;
- Controller core;
- Login log;
-
-
- Transam(String i,int p,Myrequest r,Login l){
- port = p;
- ip = i;
- req = r;
- log = l;
- reqlog = true;
- }
-
- Transam(String i,int p,Myrequest r,Controller c){
- port = p;
- ip = i;
- req = r;
- core = c;
- }
-
- public void run() {
- final thd t = new thd();
- flag = false;
- thread = new Thread(t);
- cnt = 4;
- thread.start();
- timer = new Timer();
- TimerTask task = new Timertk();
- timer.schedule(task,5000,5000);
- }
-
- class thd implements Runnable {
- @Override
- public void run() {
- try{
- SocketClient client = new SocketClient(ip,port);
- res = client.sendMsg(req);
- if(!reqlog){
- core.recieveInfo(res);
- }
- else{
- if((Integer) res.contain.get(2)==0){
- int t = (Integer) res.contain.get(1);
- log.success(t);
- }
- else{
- log.failed();
- }
- }
- Message msg = new Message();
- msg.what = 1;
- handler.sendMessage(msg);
- client.closeSocket();
- }catch (UnknownHostException e){
- e.printStackTrace();
- }catch (IOException e){
- e.printStackTrace();
- }
-
- }
- }
-
- @SuppressLint("HandlerLeak")
- Handler handler = new Handler(){
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case 1:
- flag = true;
- break;
- case 2:
- if(!reqlog){
- res = new Myrespond();
- res.wrong = msg.obj.toString();
- core.recieveInfo(res);
- }
- else{
- log.failed();
- }
- break;
- case 3:
- final thd t = new thd();
- thread = new Thread(t);
- thread.start();
- break;
- }
- super.handleMessage(msg);
- }
- };
-
- class Timertk extends TimerTask {
- public void run() {
- if(flag==false&&cnt>0){
- cnt--;
- }
- else if(cnt==0) {
- Message msg = new Message();
- msg.obj = "connecting failed";
- msg.what = 2;
- handler.sendMessage(msg);
- timer.cancel();
- }
- else if(flag==true){
- timer.cancel();
- }
- }
- };
-} \ No newline at end of file