summaryrefslogtreecommitdiff
path: root/client/Piztor/src/com/macaroon/piztor/Tracker.java
diff options
context:
space:
mode:
authorTeddy <ted.sybil@gmail.com>2013-08-26 08:50:47 +0800
committerTeddy <ted.sybil@gmail.com>2013-08-26 08:50:47 +0800
commit7a606637907476942c1f6686137ada6898d7eb14 (patch)
tree1510da0a6764f18a66958ebae6587353ac6e019c /client/Piztor/src/com/macaroon/piztor/Tracker.java
parent537d01ac3e78dec6828e068979dcd061e8f68a98 (diff)
purged the repo
Diffstat (limited to 'client/Piztor/src/com/macaroon/piztor/Tracker.java')
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Tracker.java66
1 files changed, 0 insertions, 66 deletions
diff --git a/client/Piztor/src/com/macaroon/piztor/Tracker.java b/client/Piztor/src/com/macaroon/piztor/Tracker.java
deleted file mode 100644
index db9c151..0000000
--- a/client/Piztor/src/com/macaroon/piztor/Tracker.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.macaroon.piztor;
-
-import android.content.Context;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import android.location.Location;
-import android.os.Handler;
-import android.os.Message;
-import android.util.Log;
-
-
-public class Tracker implements Runnable {
-
- private static final long TIME_DELTA = 1000 * 3; // 3 second
- public Timer timer;
- private final Context mContext;
- GPSTracker myTracker;
- Handler mHandler;
- Message message;
-
- public Tracker(Context context, Handler yHandler) {
- timer = new Timer();
- mContext = context;
- myTracker = new GPSTracker(mContext);
- mHandler = yHandler;
- }
-
- void setHandler(Handler hand) {
- mHandler = hand;
- }
-
-
- public void run() {
- GPSTask myTask = new GPSTask();
- timer.schedule(myTask, 0, TIME_DELTA);
- }
-
- class GPSTask extends TimerTask {
- @Override
- public void run() {
- Location location = myTracker.getLocation();
- Log.d("Location", "Fetching location.....");
- if (myTracker.canGetLocation()) {
-
-// Log.d("TTTTTTTTTTTTTTTTTTTTTTTime","TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTime");
-// System.out.println("GPSTIME" + myTracker.location.getTime());
-// System.out.println("SYSTIME" + SystemClock.elapsedRealtime());
-
- message = new Message();
- message.what = 0;
- message.obj = location;
- if(myTracker.isGPSFix()) {
- message.what = 1;
- } else {
- message.what = 2;
- }
- mHandler.sendMessage(message);
- } else {
- message = new Message();
- message.what = 0;
- mHandler.sendMessage(message);
- }
- }
- }
-}