From 69a0eecd6a831127d04970c4c1b5749c641b8e5e Mon Sep 17 00:00:00 2001 From: Teddy Date: Sun, 25 Aug 2013 20:54:18 +0800 Subject: removed obsolete dir --- .../gpstracking/AndroidGPSTrackingActivity.java | 50 ---------------------- 1 file changed, 50 deletions(-) delete mode 100644 misc/client/gps-demo/AndroidGPSTracking/src/com/example/gpstracking/AndroidGPSTrackingActivity.java (limited to 'misc/client/gps-demo/AndroidGPSTracking/src/com/example/gpstracking/AndroidGPSTrackingActivity.java') diff --git a/misc/client/gps-demo/AndroidGPSTracking/src/com/example/gpstracking/AndroidGPSTrackingActivity.java b/misc/client/gps-demo/AndroidGPSTracking/src/com/example/gpstracking/AndroidGPSTrackingActivity.java deleted file mode 100644 index cdc1413..0000000 --- a/misc/client/gps-demo/AndroidGPSTracking/src/com/example/gpstracking/AndroidGPSTrackingActivity.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.example.gpstracking; - -import android.app.Activity; -import android.os.Bundle; -import android.view.View; -import android.widget.Button; -import android.widget.Toast; - -public class AndroidGPSTrackingActivity extends Activity { - - Button btnShowLocation; - - // GPSTracker class - GPSTracker gps; - - @Override - public void onCreate(Bundle savedInstanceState) { - - super.onCreate(savedInstanceState); - setContentView(R.layout.main); - - btnShowLocation = (Button) findViewById(R.id.btnShowLocation); - - // show location button click event - btnShowLocation.setOnClickListener(new View.OnClickListener() { - - @Override - public void onClick(View arg0) { - // create class object - gps = new GPSTracker(AndroidGPSTrackingActivity.this); - - // check if GPS enabled - if(gps.canGetLocation()){ - - double latitude = gps.getLatitude(); - double longitude = gps.getLongitude(); - - Toast.makeText(getApplicationContext(), "Your Location is - \nLat: " + latitude + "\nLong: " + longitude, Toast.LENGTH_LONG).show(); - }else{ - // can't get location - // GPS or Network is not enabled - // Ask user to enable GPS/network in settings - gps.showSettingsAlert(); - } - - } - }); - } - -} \ No newline at end of file -- cgit v1.2.3-70-g09d2