From c6c75af649359781e792cb841b44fb06631f08ad Mon Sep 17 00:00:00 2001 From: Myth Yang Date: Fri, 23 Aug 2013 15:08:35 +0800 Subject: oops --- client/Socket-demo/Login.java | 6 ++++++ client/Socket-demo/Transam.java | 31 +++++++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 client/Socket-demo/Login.java diff --git a/client/Socket-demo/Login.java b/client/Socket-demo/Login.java new file mode 100644 index 0000000..2dd386c --- /dev/null +++ b/client/Socket-demo/Login.java @@ -0,0 +1,6 @@ +package com.example.test; + +public class Login{ + void success(int t){} + void failed(){} +} \ No newline at end of file diff --git a/client/Socket-demo/Transam.java b/client/Socket-demo/Transam.java index 6f0fb44..b5e2381 100644 --- a/client/Socket-demo/Transam.java +++ b/client/Socket-demo/Transam.java @@ -12,6 +12,7 @@ import android.os.Message; public class Transam implements Runnable { public Timer timer; public boolean flag = true; + public boolean reqlog = false; public int cnt = 4; public int port; public String ip; @@ -19,6 +20,16 @@ public class Transam implements Runnable { 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; @@ -43,8 +54,19 @@ public class Transam implements Runnable { public void run() { try{ SocketClient client = new SocketClient(ip,port); - res = client.sendMsg(req); + 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); @@ -63,10 +85,15 @@ public class Transam implements Runnable { case 1: flag = true; break; - case 2: + 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(); -- cgit v1.2.3 From 40592c2ae7506bfb4694f59f3b4825099acdcd0e Mon Sep 17 00:00:00 2001 From: goblin911 Date: Fri, 23 Aug 2013 15:52:00 +0800 Subject: add activity demo --- .../src/com/example/piztor/Controller.java | 30 +++++ .../src/com/example/piztor/Login.java | 18 +++ .../src/com/example/piztor/MainActivity.java | 104 +++++++++++++++++ .../src/com/example/piztor/MyView.java | 75 +++++++++++++ .../src/com/example/piztor/Myrequest.java | 10 ++ .../src/com/example/piztor/Myrespond.java | 12 ++ .../src/com/example/piztor/Running.java | 42 +++++++ .../src/com/example/piztor/SocketClient.java | 114 +++++++++++++++++++ .../src/com/example/piztor/Transam.java | 124 +++++++++++++++++++++ 9 files changed, 529 insertions(+) create mode 100644 client/activity-demo/src/com/example/piztor/Controller.java create mode 100644 client/activity-demo/src/com/example/piztor/Login.java create mode 100644 client/activity-demo/src/com/example/piztor/MainActivity.java create mode 100644 client/activity-demo/src/com/example/piztor/MyView.java create mode 100644 client/activity-demo/src/com/example/piztor/Myrequest.java create mode 100644 client/activity-demo/src/com/example/piztor/Myrespond.java create mode 100644 client/activity-demo/src/com/example/piztor/Running.java create mode 100644 client/activity-demo/src/com/example/piztor/SocketClient.java create mode 100644 client/activity-demo/src/com/example/piztor/Transam.java diff --git a/client/activity-demo/src/com/example/piztor/Controller.java b/client/activity-demo/src/com/example/piztor/Controller.java new file mode 100644 index 0000000..6e55581 --- /dev/null +++ b/client/activity-demo/src/com/example/piztor/Controller.java @@ -0,0 +1,30 @@ +package com.example.piztor; + +import java.io.Serializable; +import android.content.Intent; + +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) { + run.v.drawLocation(x, y); + } +} diff --git a/client/activity-demo/src/com/example/piztor/Login.java b/client/activity-demo/src/com/example/piztor/Login.java new file mode 100644 index 0000000..e7712c4 --- /dev/null +++ b/client/activity-demo/src/com/example/piztor/Login.java @@ -0,0 +1,18 @@ +package com.example.piztor; + +public class Login { + MainActivity main; + + Login(MainActivity main) { + this.main = main; + } + + void success(int token) { + main.start(); + System.out.println("token!"); + } + + void failed() { + System.out.println("fuck!!"); + } +} diff --git a/client/activity-demo/src/com/example/piztor/MainActivity.java b/client/activity-demo/src/com/example/piztor/MainActivity.java new file mode 100644 index 0000000..333bfd4 --- /dev/null +++ b/client/activity-demo/src/com/example/piztor/MainActivity.java @@ -0,0 +1,104 @@ +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; + 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); + b = (Button) findViewById(R.id.login); + b.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + cout.println(username.getText().toString()); + cout.println(password.getText().toString()); + cout.println(ip.getText().toString()); + cout.println(port.getText().toString()); + ip.setText("192.168.1.102"); + port.setText("9990"); + username.setText("hello"); + password.setText("world"); + Vector r = new Vector(); + 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(); + } + }); + 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(); + 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/src/com/example/piztor/MyView.java b/client/activity-demo/src/com/example/piztor/MyView.java new file mode 100644 index 0000000..1627e4c --- /dev/null +++ b/client/activity-demo/src/com/example/piztor/MyView.java @@ -0,0 +1,75 @@ +package com.example.piztor; + +import java.io.*; +import android.content.*; +import android.graphics.*; +import android.graphics.Paint.Style; +import android.util.*; +import android.view.*; + +public class MyView extends View { + static PrintStream cout = System.out; + private Paint mPaint; + public Canvas c = null; + public Bitmap b = null; + public double scale = 100; + public double centerX, centerY; +// Vector v; + + void setup(Canvas c, Bitmap b, double x, double y) { + this.c = c; + this.b = b; + centerX = x; + centerY = y; + } + + public MyView(Context context) { + super(context); +// v = new Vector(); + mPaint = new Paint(); + mPaint.setColor(Color.RED); + mPaint.setStyle(Style.FILL); + } + + public MyView(Context context, AttributeSet attr) { + super(context, attr); +// v = new Vector(); + mPaint = new Paint(); + mPaint.setColor(Color.RED); + mPaint.setStyle(Style.FILL); + } + + @Override + protected void onDraw(Canvas canvas) { + super.onDraw(canvas); + canvas.drawBitmap(b, 0, 0, mPaint); + // 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 drawLocation(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); + c.drawRect(x1 - 1, y1 + 1, x1 + 1, y1 - 1, mPaint); + 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/src/com/example/piztor/Myrequest.java b/client/activity-demo/src/com/example/piztor/Myrequest.java new file mode 100644 index 0000000..9397e0c --- /dev/null +++ b/client/activity-demo/src/com/example/piztor/Myrequest.java @@ -0,0 +1,10 @@ +package com.example.piztor; + +import java.util.Vector; + +public class Myrequest{ + public Vector contain; + Myrequest(Vector info){ + contain = info; + } +} \ No newline at end of file diff --git a/client/activity-demo/src/com/example/piztor/Myrespond.java b/client/activity-demo/src/com/example/piztor/Myrespond.java new file mode 100644 index 0000000..2398f2b --- /dev/null +++ b/client/activity-demo/src/com/example/piztor/Myrespond.java @@ -0,0 +1,12 @@ +package com.example.piztor; + +import java.util.Vector; + +public class Myrespond{ + public Vector contain; + public String wrong; + Myrespond(){ + wrong = null; + contain = new Vector(); + } +} \ No newline at end of file diff --git a/client/activity-demo/src/com/example/piztor/Running.java b/client/activity-demo/src/com/example/piztor/Running.java new file mode 100644 index 0000000..4ea1526 --- /dev/null +++ b/client/activity-demo/src/com/example/piztor/Running.java @@ -0,0 +1,42 @@ +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, 31, 121); + } + + @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/src/com/example/piztor/SocketClient.java b/client/activity-demo/src/com/example/piztor/SocketClient.java new file mode 100644 index 0000000..e66b5bc --- /dev/null +++ b/client/activity-demo/src/com/example/piztor/SocketClient.java @@ -0,0 +1,114 @@ +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.writeUTF(id); + out.writeUTF(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.writeUTF(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); + 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 lot = in.readDouble(); + double lat = in.readDouble(); + r.contain.add(tid); + r.contain.add(lot); + r.contain.add(lat); + } + 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/src/com/example/piztor/Transam.java b/client/activity-demo/src/com/example/piztor/Transam.java new file mode 100644 index 0000000..e39abd5 --- /dev/null +++ b/client/activity-demo/src/com/example/piztor/Transam.java @@ -0,0 +1,124 @@ +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 = 4; + 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,2000,2000); + } + + 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){ + }catch (IOException e){ + } + + } + } + + @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 -- cgit v1.2.3 From a33ed0eabe94748b7ff6604af58dd25a0024bf04 Mon Sep 17 00:00:00 2001 From: goblin911 Date: Fri, 23 Aug 2013 16:00:07 +0800 Subject: asdf --- client/activity-demo/Piztor/.classpath | 9 + client/activity-demo/Piztor/.project | 33 ++++ .../Piztor/.settings/org.eclipse.jdt.core.prefs | 4 + client/activity-demo/Piztor/AndroidManifest.xml | 31 ++++ .../activity-demo/Piztor/bin/AndroidManifest.xml | 31 ++++ client/activity-demo/Piztor/bin/Piztor.apk | Bin 0 -> 3695642 bytes client/activity-demo/Piztor/bin/classes.dex | Bin 0 -> 636728 bytes .../classes/com/example/piztor/BuildConfig.class | Bin 0 -> 345 bytes .../classes/com/example/piztor/Controller.class | Bin 0 -> 1221 bytes .../classes/com/example/piztor/GPSTracker$1.class | Bin 0 -> 1176 bytes .../classes/com/example/piztor/GPSTracker$2.class | Bin 0 -> 854 bytes .../classes/com/example/piztor/GPSTracker.class | Bin 0 -> 4458 bytes .../bin/classes/com/example/piztor/Login.class | Bin 0 -> 808 bytes .../com/example/piztor/MainActivity$1.class | Bin 0 -> 2226 bytes .../classes/com/example/piztor/MainActivity.class | Bin 0 -> 2898 bytes .../bin/classes/com/example/piztor/MyView.class | Bin 0 -> 2787 bytes .../bin/classes/com/example/piztor/Myrequest.class | Bin 0 -> 549 bytes .../bin/classes/com/example/piztor/Myrespond.class | Bin 0 -> 502 bytes .../bin/classes/com/example/piztor/R$attr.class | Bin 0 -> 340 bytes .../bin/classes/com/example/piztor/R$dimen.class | Bin 0 -> 461 bytes .../classes/com/example/piztor/R$drawable.class | Bin 0 -> 435 bytes .../bin/classes/com/example/piztor/R$id.class | Bin 0 -> 568 bytes .../bin/classes/com/example/piztor/R$layout.class | Bin 0 -> 443 bytes .../bin/classes/com/example/piztor/R$menu.class | Bin 0 -> 419 bytes .../bin/classes/com/example/piztor/R$string.class | Bin 0 -> 518 bytes .../bin/classes/com/example/piztor/R$style.class | Bin 0 -> 431 bytes .../Piztor/bin/classes/com/example/piztor/R.class | Bin 0 -> 673 bytes .../bin/classes/com/example/piztor/Running.class | Bin 0 -> 2017 bytes .../classes/com/example/piztor/SocketClient.class | Bin 0 -> 3962 bytes .../com/example/piztor/Tracker$GPSTask.class | Bin 0 -> 749 bytes .../bin/classes/com/example/piztor/Tracker.class | Bin 0 -> 935 bytes .../bin/classes/com/example/piztor/Transam$1.class | Bin 0 -> 1655 bytes .../com/example/piztor/Transam$Timertk.class | Bin 0 -> 1102 bytes .../classes/com/example/piztor/Transam$thd.class | Bin 0 -> 1996 bytes .../bin/classes/com/example/piztor/Transam.class | Bin 0 -> 2082 bytes ...support-v4-6b57c516e4d1603db1d416c633a3e0a1.jar | Bin 0 -> 211326 bytes client/activity-demo/Piztor/bin/jarlist.cache | 3 + .../Piztor/bin/res/drawable-hdpi/ic_launcher.png | Bin 0 -> 5964 bytes .../Piztor/bin/res/drawable-mdpi/ic_launcher.png | Bin 0 -> 3112 bytes .../Piztor/bin/res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 9355 bytes .../Piztor/bin/res/drawable-xxhdpi/ic_launcher.png | Bin 0 -> 17889 bytes client/activity-demo/Piztor/bin/resources.ap_ | Bin 0 -> 3475139 bytes client/activity-demo/Piztor/data.jpg | Bin 0 -> 686402 bytes .../Piztor/gen/com/example/piztor/BuildConfig.java | 6 + .../Piztor/gen/com/example/piztor/R.java | 78 ++++++++ client/activity-demo/Piztor/ic_launcher-web.png | Bin 0 -> 51394 bytes .../Piztor/libs/android-support-v4.jar | Bin 0 -> 556198 bytes client/activity-demo/Piztor/proguard-project.txt | 20 +++ client/activity-demo/Piztor/project.properties | 14 ++ .../Piztor/res/drawable-hdpi/data.jpg | Bin 0 -> 686402 bytes .../Piztor/res/drawable-hdpi/ic_launcher.png | Bin 0 -> 7658 bytes .../Piztor/res/drawable-ldpi/data.jpg | Bin 0 -> 686402 bytes .../Piztor/res/drawable-mdpi/data.jpg | Bin 0 -> 686402 bytes .../Piztor/res/drawable-mdpi/ic_launcher.png | Bin 0 -> 3777 bytes .../Piztor/res/drawable-xhdpi/data.jpg | Bin 0 -> 686402 bytes .../Piztor/res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 12516 bytes .../Piztor/res/drawable-xxhdpi/data.jpg | Bin 0 -> 686402 bytes .../Piztor/res/drawable-xxhdpi/ic_launcher.png | Bin 0 -> 24777 bytes .../Piztor/res/layout/activity_main.xml | 44 +++++ .../Piztor/res/layout/activity_running.xml | 14 ++ client/activity-demo/Piztor/res/menu/main.xml | 9 + client/activity-demo/Piztor/res/menu/running.xml | 9 + .../Piztor/res/values-sw600dp/dimens.xml | 8 + .../Piztor/res/values-sw720dp-land/dimens.xml | 9 + .../activity-demo/Piztor/res/values-v11/styles.xml | 11 ++ .../activity-demo/Piztor/res/values-v14/styles.xml | 12 ++ client/activity-demo/Piztor/res/values/dimens.xml | 7 + client/activity-demo/Piztor/res/values/strings.xml | 9 + client/activity-demo/Piztor/res/values/styles.xml | 20 +++ .../Piztor/src/com/example/piztor/Controller.java | 30 ++++ .../Piztor/src/com/example/piztor/GPSTracker.java | 199 +++++++++++++++++++++ .../Piztor/src/com/example/piztor/Login.java | 18 ++ .../src/com/example/piztor/MainActivity.java | 104 +++++++++++ .../Piztor/src/com/example/piztor/MyView.java | 75 ++++++++ .../Piztor/src/com/example/piztor/Myrequest.java | 10 ++ .../Piztor/src/com/example/piztor/Myrespond.java | 12 ++ .../Piztor/src/com/example/piztor/Running.java | 42 +++++ .../src/com/example/piztor/SocketClient.java | 114 ++++++++++++ .../Piztor/src/com/example/piztor/Tracker.java | 34 ++++ .../Piztor/src/com/example/piztor/Transam.java | 124 +++++++++++++ 80 files changed, 1143 insertions(+) create mode 100644 client/activity-demo/Piztor/.classpath create mode 100644 client/activity-demo/Piztor/.project create mode 100644 client/activity-demo/Piztor/.settings/org.eclipse.jdt.core.prefs create mode 100644 client/activity-demo/Piztor/AndroidManifest.xml create mode 100644 client/activity-demo/Piztor/bin/AndroidManifest.xml create mode 100644 client/activity-demo/Piztor/bin/Piztor.apk create mode 100644 client/activity-demo/Piztor/bin/classes.dex create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/BuildConfig.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/Controller.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker$1.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker$2.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/Login.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/MainActivity$1.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/MainActivity.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/MyView.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/Myrequest.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/Myrespond.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/R$attr.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/R$dimen.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/R$drawable.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/R$id.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/R$layout.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/R$menu.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/R$string.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/R$style.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/R.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/Running.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/SocketClient.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/Tracker$GPSTask.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/Tracker.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$1.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$Timertk.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$thd.class create mode 100644 client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam.class create mode 100644 client/activity-demo/Piztor/bin/dexedLibs/android-support-v4-6b57c516e4d1603db1d416c633a3e0a1.jar create mode 100644 client/activity-demo/Piztor/bin/jarlist.cache create mode 100644 client/activity-demo/Piztor/bin/res/drawable-hdpi/ic_launcher.png create mode 100644 client/activity-demo/Piztor/bin/res/drawable-mdpi/ic_launcher.png create mode 100644 client/activity-demo/Piztor/bin/res/drawable-xhdpi/ic_launcher.png create mode 100644 client/activity-demo/Piztor/bin/res/drawable-xxhdpi/ic_launcher.png create mode 100644 client/activity-demo/Piztor/bin/resources.ap_ create mode 100644 client/activity-demo/Piztor/data.jpg create mode 100644 client/activity-demo/Piztor/gen/com/example/piztor/BuildConfig.java create mode 100644 client/activity-demo/Piztor/gen/com/example/piztor/R.java create mode 100644 client/activity-demo/Piztor/ic_launcher-web.png create mode 100644 client/activity-demo/Piztor/libs/android-support-v4.jar create mode 100644 client/activity-demo/Piztor/proguard-project.txt create mode 100644 client/activity-demo/Piztor/project.properties create mode 100644 client/activity-demo/Piztor/res/drawable-hdpi/data.jpg create mode 100644 client/activity-demo/Piztor/res/drawable-hdpi/ic_launcher.png create mode 100644 client/activity-demo/Piztor/res/drawable-ldpi/data.jpg create mode 100644 client/activity-demo/Piztor/res/drawable-mdpi/data.jpg create mode 100644 client/activity-demo/Piztor/res/drawable-mdpi/ic_launcher.png create mode 100644 client/activity-demo/Piztor/res/drawable-xhdpi/data.jpg create mode 100644 client/activity-demo/Piztor/res/drawable-xhdpi/ic_launcher.png create mode 100644 client/activity-demo/Piztor/res/drawable-xxhdpi/data.jpg create mode 100644 client/activity-demo/Piztor/res/drawable-xxhdpi/ic_launcher.png create mode 100644 client/activity-demo/Piztor/res/layout/activity_main.xml create mode 100644 client/activity-demo/Piztor/res/layout/activity_running.xml create mode 100644 client/activity-demo/Piztor/res/menu/main.xml create mode 100644 client/activity-demo/Piztor/res/menu/running.xml create mode 100644 client/activity-demo/Piztor/res/values-sw600dp/dimens.xml create mode 100644 client/activity-demo/Piztor/res/values-sw720dp-land/dimens.xml create mode 100644 client/activity-demo/Piztor/res/values-v11/styles.xml create mode 100644 client/activity-demo/Piztor/res/values-v14/styles.xml create mode 100644 client/activity-demo/Piztor/res/values/dimens.xml create mode 100644 client/activity-demo/Piztor/res/values/strings.xml create mode 100644 client/activity-demo/Piztor/res/values/styles.xml create mode 100644 client/activity-demo/Piztor/src/com/example/piztor/Controller.java create mode 100644 client/activity-demo/Piztor/src/com/example/piztor/GPSTracker.java create mode 100644 client/activity-demo/Piztor/src/com/example/piztor/Login.java create mode 100644 client/activity-demo/Piztor/src/com/example/piztor/MainActivity.java create mode 100644 client/activity-demo/Piztor/src/com/example/piztor/MyView.java create mode 100644 client/activity-demo/Piztor/src/com/example/piztor/Myrequest.java create mode 100644 client/activity-demo/Piztor/src/com/example/piztor/Myrespond.java create mode 100644 client/activity-demo/Piztor/src/com/example/piztor/Running.java create mode 100644 client/activity-demo/Piztor/src/com/example/piztor/SocketClient.java create mode 100644 client/activity-demo/Piztor/src/com/example/piztor/Tracker.java create mode 100644 client/activity-demo/Piztor/src/com/example/piztor/Transam.java diff --git a/client/activity-demo/Piztor/.classpath b/client/activity-demo/Piztor/.classpath new file mode 100644 index 0000000..7bc01d9 --- /dev/null +++ b/client/activity-demo/Piztor/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/client/activity-demo/Piztor/.project b/client/activity-demo/Piztor/.project new file mode 100644 index 0000000..97100ec --- /dev/null +++ b/client/activity-demo/Piztor/.project @@ -0,0 +1,33 @@ + + + Piztor + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/client/activity-demo/Piztor/.settings/org.eclipse.jdt.core.prefs b/client/activity-demo/Piztor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..b080d2d --- /dev/null +++ b/client/activity-demo/Piztor/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/client/activity-demo/Piztor/AndroidManifest.xml b/client/activity-demo/Piztor/AndroidManifest.xml new file mode 100644 index 0000000..9561604 --- /dev/null +++ b/client/activity-demo/Piztor/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + diff --git a/client/activity-demo/Piztor/bin/AndroidManifest.xml b/client/activity-demo/Piztor/bin/AndroidManifest.xml new file mode 100644 index 0000000..9561604 --- /dev/null +++ b/client/activity-demo/Piztor/bin/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + diff --git a/client/activity-demo/Piztor/bin/Piztor.apk b/client/activity-demo/Piztor/bin/Piztor.apk new file mode 100644 index 0000000..fc36012 Binary files /dev/null and b/client/activity-demo/Piztor/bin/Piztor.apk differ diff --git a/client/activity-demo/Piztor/bin/classes.dex b/client/activity-demo/Piztor/bin/classes.dex new file mode 100644 index 0000000..f8a5442 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes.dex 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 new file mode 100644 index 0000000..05d2e99 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/BuildConfig.class 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 new file mode 100644 index 0000000..0b98ba7 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Controller.class 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 new file mode 100644 index 0000000..ffabec6 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker$1.class 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 new file mode 100644 index 0000000..ae2fc52 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker$2.class 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 new file mode 100644 index 0000000..ae8c248 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/GPSTracker.class 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 new file mode 100644 index 0000000..8145ba5 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Login.class 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 new file mode 100644 index 0000000..333a3c3 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/MainActivity$1.class 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 new file mode 100644 index 0000000..90f6d2e Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/MainActivity.class 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 new file mode 100644 index 0000000..19f49c1 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/MyView.class 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 new file mode 100644 index 0000000..80893f6 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Myrequest.class 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 new file mode 100644 index 0000000..a475cee Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Myrespond.class 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 new file mode 100644 index 0000000..bf7ee98 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$attr.class 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 new file mode 100644 index 0000000..a0d6549 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$dimen.class 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 new file mode 100644 index 0000000..0438e22 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$drawable.class 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 new file mode 100644 index 0000000..9139bf3 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$id.class 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 new file mode 100644 index 0000000..6be2329 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$layout.class 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 new file mode 100644 index 0000000..714190a Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$menu.class 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 new file mode 100644 index 0000000..d2df448 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$string.class 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 new file mode 100644 index 0000000..07085b3 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R$style.class 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 new file mode 100644 index 0000000..178a999 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/R.class 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 new file mode 100644 index 0000000..05f560c Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Running.class 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 new file mode 100644 index 0000000..29afa9c Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/SocketClient.class 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 new file mode 100644 index 0000000..a72e8f3 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Tracker$GPSTask.class 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 new file mode 100644 index 0000000..4cc54cd Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Tracker.class 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 new file mode 100644 index 0000000..5999fc1 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$1.class 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 new file mode 100644 index 0000000..42f06c9 Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$Timertk.class 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 new file mode 100644 index 0000000..e402d5b Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam$thd.class 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 new file mode 100644 index 0000000..60f93bf Binary files /dev/null and b/client/activity-demo/Piztor/bin/classes/com/example/piztor/Transam.class 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 new file mode 100644 index 0000000..08c0c4b Binary files /dev/null and b/client/activity-demo/Piztor/bin/dexedLibs/android-support-v4-6b57c516e4d1603db1d416c633a3e0a1.jar differ diff --git a/client/activity-demo/Piztor/bin/jarlist.cache b/client/activity-demo/Piztor/bin/jarlist.cache new file mode 100644 index 0000000..0565465 --- /dev/null +++ b/client/activity-demo/Piztor/bin/jarlist.cache @@ -0,0 +1,3 @@ +# cache for current jar dependency. DO NOT EDIT. +# format is +# 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 new file mode 100644 index 0000000..efa7c5f Binary files /dev/null and b/client/activity-demo/Piztor/bin/res/drawable-hdpi/ic_launcher.png 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 new file mode 100644 index 0000000..ec27f2e Binary files /dev/null and b/client/activity-demo/Piztor/bin/res/drawable-mdpi/ic_launcher.png 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 new file mode 100644 index 0000000..92fc57d Binary files /dev/null and b/client/activity-demo/Piztor/bin/res/drawable-xhdpi/ic_launcher.png 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 new file mode 100644 index 0000000..b6f8f4e Binary files /dev/null and b/client/activity-demo/Piztor/bin/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/client/activity-demo/Piztor/bin/resources.ap_ b/client/activity-demo/Piztor/bin/resources.ap_ new file mode 100644 index 0000000..859ad06 Binary files /dev/null and b/client/activity-demo/Piztor/bin/resources.ap_ differ diff --git a/client/activity-demo/Piztor/data.jpg b/client/activity-demo/Piztor/data.jpg new file mode 100644 index 0000000..f549ec7 Binary files /dev/null and b/client/activity-demo/Piztor/data.jpg differ diff --git a/client/activity-demo/Piztor/gen/com/example/piztor/BuildConfig.java b/client/activity-demo/Piztor/gen/com/example/piztor/BuildConfig.java new file mode 100644 index 0000000..e2a8a2d --- /dev/null +++ b/client/activity-demo/Piztor/gen/com/example/piztor/BuildConfig.java @@ -0,0 +1,6 @@ +/** Automatically generated file. DO NOT MODIFY */ +package com.example.piztor; + +public final class BuildConfig { + public final static boolean DEBUG = true; +} \ No newline at end of file diff --git a/client/activity-demo/Piztor/gen/com/example/piztor/R.java b/client/activity-demo/Piztor/gen/com/example/piztor/R.java new file mode 100644 index 0000000..6e48ffd --- /dev/null +++ b/client/activity-demo/Piztor/gen/com/example/piztor/R.java @@ -0,0 +1,78 @@ +/* AUTO-GENERATED FILE. DO NOT MODIFY. + * + * This class was automatically generated by the + * aapt tool from the resource data it found. It + * should not be modified by hand. + */ + +package com.example.piztor; + +public final class R { + public static final class attr { + } + public static final class dimen { + /** Default screen margins, per the Android Design guidelines. + + Customize dimensions originally defined in res/values/dimens.xml (such as + screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. + + */ + public static final int activity_horizontal_margin=0x7f040000; + 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 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 class layout { + public static final int activity_main=0x7f030000; + public static final int activity_running=0x7f030001; + } + public static final class menu { + public static final int main=0x7f070000; + public static final int running=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 class style { + /** + Base application theme, dependent on API level. This theme is replaced + by AppBaseTheme from res/values-vXX/styles.xml on newer devices. + + + Theme customizations available in newer API levels can go in + res/values-vXX/styles.xml, while customizations related to + backward-compatibility can go here. + + + Base application theme for API 11+. This theme completely replaces + AppBaseTheme from res/values/styles.xml on API 11+ devices. + + API 11 theme customizations can go here. + + Base application theme for API 14+. This theme completely replaces + AppBaseTheme from BOTH res/values/styles.xml and + res/values-v11/styles.xml on API 14+ devices. + + API 14 theme customizations can go here. + */ + public static final int AppBaseTheme=0x7f060000; + /** Application theme. + All customizations that are NOT specific to a particular API-level can go here. + */ + public static final int AppTheme=0x7f060001; + } +} diff --git a/client/activity-demo/Piztor/ic_launcher-web.png b/client/activity-demo/Piztor/ic_launcher-web.png new file mode 100644 index 0000000..a18cbb4 Binary files /dev/null and b/client/activity-demo/Piztor/ic_launcher-web.png differ diff --git a/client/activity-demo/Piztor/libs/android-support-v4.jar b/client/activity-demo/Piztor/libs/android-support-v4.jar new file mode 100644 index 0000000..cf12d28 Binary files /dev/null and b/client/activity-demo/Piztor/libs/android-support-v4.jar differ diff --git a/client/activity-demo/Piztor/proguard-project.txt b/client/activity-demo/Piztor/proguard-project.txt new file mode 100644 index 0000000..f2fe155 --- /dev/null +++ b/client/activity-demo/Piztor/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/client/activity-demo/Piztor/project.properties b/client/activity-demo/Piztor/project.properties new file mode 100644 index 0000000..ce39f2d --- /dev/null +++ b/client/activity-demo/Piztor/project.properties @@ -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-18 diff --git a/client/activity-demo/Piztor/res/drawable-hdpi/data.jpg b/client/activity-demo/Piztor/res/drawable-hdpi/data.jpg new file mode 100644 index 0000000..f549ec7 Binary files /dev/null and b/client/activity-demo/Piztor/res/drawable-hdpi/data.jpg differ diff --git a/client/activity-demo/Piztor/res/drawable-hdpi/ic_launcher.png b/client/activity-demo/Piztor/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..288b665 Binary files /dev/null and b/client/activity-demo/Piztor/res/drawable-hdpi/ic_launcher.png differ diff --git a/client/activity-demo/Piztor/res/drawable-ldpi/data.jpg b/client/activity-demo/Piztor/res/drawable-ldpi/data.jpg new file mode 100644 index 0000000..f549ec7 Binary files /dev/null and b/client/activity-demo/Piztor/res/drawable-ldpi/data.jpg differ diff --git a/client/activity-demo/Piztor/res/drawable-mdpi/data.jpg b/client/activity-demo/Piztor/res/drawable-mdpi/data.jpg new file mode 100644 index 0000000..f549ec7 Binary files /dev/null and b/client/activity-demo/Piztor/res/drawable-mdpi/data.jpg differ diff --git a/client/activity-demo/Piztor/res/drawable-mdpi/ic_launcher.png b/client/activity-demo/Piztor/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..6ae570b Binary files /dev/null and b/client/activity-demo/Piztor/res/drawable-mdpi/ic_launcher.png differ diff --git a/client/activity-demo/Piztor/res/drawable-xhdpi/data.jpg b/client/activity-demo/Piztor/res/drawable-xhdpi/data.jpg new file mode 100644 index 0000000..f549ec7 Binary files /dev/null and b/client/activity-demo/Piztor/res/drawable-xhdpi/data.jpg differ diff --git a/client/activity-demo/Piztor/res/drawable-xhdpi/ic_launcher.png b/client/activity-demo/Piztor/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..d4fb7cd Binary files /dev/null and b/client/activity-demo/Piztor/res/drawable-xhdpi/ic_launcher.png differ diff --git a/client/activity-demo/Piztor/res/drawable-xxhdpi/data.jpg b/client/activity-demo/Piztor/res/drawable-xxhdpi/data.jpg new file mode 100644 index 0000000..f549ec7 Binary files /dev/null and b/client/activity-demo/Piztor/res/drawable-xxhdpi/data.jpg differ diff --git a/client/activity-demo/Piztor/res/drawable-xxhdpi/ic_launcher.png b/client/activity-demo/Piztor/res/drawable-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..85a6081 Binary files /dev/null and b/client/activity-demo/Piztor/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/client/activity-demo/Piztor/res/layout/activity_main.xml b/client/activity-demo/Piztor/res/layout/activity_main.xml new file mode 100644 index 0000000..075a1f6 --- /dev/null +++ b/client/activity-demo/Piztor/res/layout/activity_main.xml @@ -0,0 +1,44 @@ + + + + + + + + + +