Skip to content

Commit

Permalink
Disabling last sent date for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronpk committed Feb 18, 2011
1 parent aed1764 commit afeaaa9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
9 changes: 4 additions & 5 deletions gen/com/geoloqi/android1/R.java
Expand Up @@ -20,18 +20,17 @@ public static final class drawable {
public static final int ic_stat_notify=0x7f020002;
}
public static final class id {
public static final int buttonStart=0x7f08000c;
public static final int buttonStart=0x7f08000b;
public static final int editTextEmail=0x7f080002;
public static final int editTextPassword=0x7f080003;
public static final int geoloqiLogo=0x7f080004;
public static final int login=0x7f08000e;
public static final int quit=0x7f08000f;
public static final int login=0x7f08000d;
public static final int quit=0x7f08000e;
public static final int root=0x7f080000;
public static final int settings=0x7f08000d;
public static final int settings=0x7f08000c;
public static final int textAccuracy=0x7f080009;
public static final int textAltitude=0x7f080008;
public static final int textEmail=0x7f080001;
public static final int textLastSent=0x7f08000b;
public static final int textLatitude=0x7f080005;
public static final int textLongitude=0x7f080006;
public static final int textNumPointsInQueue=0x7f08000a;
Expand Down
4 changes: 2 additions & 2 deletions res/layout/main.xml
Expand Up @@ -35,12 +35,12 @@
<TableRow>
<TextView android:layout_column="0" android:padding="3dip" android:text="Points in Queue" />
<TextView android:layout_width="wrap_content" android:text="@+id/textNumPointsInQueue" android:layout_height="wrap_content" android:id="@+id/textNumPointsInQueue"></TextView>
</TableRow>
</TableRow><!--
<TableRow>
<TextView android:layout_column="0" android:padding="3dip" android:text="Last Sent" />
<TextView android:layout_width="wrap_content" android:text="@+id/textLastSent" android:layout_height="wrap_content" android:id="@+id/textLastSent"></TextView>
</TableRow>
<Button android:layout_span="2" android:gravity="center_horizontal" android:layout_height="wrap_content" android:id="@+id/buttonStart" android:text="Start" android:layout_marginTop="20dp"></Button>
--><Button android:layout_span="2" android:gravity="center_horizontal" android:layout_height="wrap_content" android:id="@+id/buttonStart" android:text="Start" android:layout_marginTop="20dp"></Button>
</TableLayout>

</LinearLayout>
14 changes: 7 additions & 7 deletions src/com/geoloqi/android1/Geoloqi.java
Expand Up @@ -50,7 +50,7 @@ public void onCreate(Bundle savedInstanceState) {
spdLabel = (TextView) findViewById(R.id.textSpeed);
accLabel = (TextView) findViewById(R.id.textAccuracy);
numPointsLabel = (TextView) findViewById(R.id.textNumPointsInQueue);
lastSentLabel = (TextView) findViewById(R.id.textLastSent);
// lastSentLabel = (TextView) findViewById(R.id.textLastSent);

buttonStart.setOnClickListener(this);
// buttonStop.setOnClickListener(this);
Expand Down Expand Up @@ -210,12 +210,12 @@ protected void onPostExecute(LQPoint point) {
accLabel.setText(""+point.horizontalAccuracy + "m");
numPointsLabel.setText(""+db.numberOfUnsentPoints());

Date lastSent = GeoloqiHTTPRequest.singleton().lastSent;
Log.i(Geoloqi.TAG, "+++++++++ " + lastSent);
if(lastSent == null)
return;

lastSentLabel.setText(""+((System.currentTimeMillis()/1000) - lastSent.getTime()) + " seconds");
// TODO: Talk to the service to find out the date the last point was sent
// Date lastSent = ???
// if(lastSent == null)
// return;
//
// lastSentLabel.setText(""+((System.currentTimeMillis()/1000) - lastSent.getTime()) + " seconds");
}
}

Expand Down
1 change: 0 additions & 1 deletion src/com/geoloqi/android1/GeoloqiHTTPRequest.java
Expand Up @@ -33,7 +33,6 @@ public class GeoloqiHTTPRequest {

public static GeoloqiHTTPRequest singleton() {
if(singleton == null) {
Log.i(Geoloqi.TAG, "}}}}}} Creating new HTTP Request");
singleton = new GeoloqiHTTPRequest();
}
return singleton;
Expand Down
2 changes: 1 addition & 1 deletion src/com/geoloqi/android1/GeoloqiService.java
Expand Up @@ -166,7 +166,7 @@ protected void onProgressUpdate() {
@Override
protected void onPostExecute(Void v) {
// Log.d(TAG, "Flush queue completed");

lastPointSent = GeoloqiHTTPRequest.singleton().lastSent;
}
}

Expand Down

0 comments on commit afeaaa9

Please sign in to comment.