Code example for Location

Methods: getAccuracygetLatitudegetLongitude

		private double gpsLat = -1;
		private double gpsLong = -1;
		private double accuracy = -1;
		public void onLocationChanged (Location loc){
			gpsLat = loc.getLatitude();
			gpsLong = loc.getLongitude();
			accuracy = loc.getAccuracy();
			Date now = new Date();
			long currentTime = now.getTime()-startTime;
			Log.e(TAG, "GpsLocHandler - locationChanged to "+gpsLat+"/"+gpsLong+"/"+accuracy);
			writeData(filenameLoc, currentTime+"\t"+gpsLat+"\t"+gpsLong+"\t"+accuracy);
		public void onProviderDisabled(String arg0) {
			// TODO Auto-generated method stub 
			Log.e(TAG, "GPSLocHandler - onProviderDisabled");
			writeData("GPS_PROVIDER_DISABLED", arg0);
Stop searching for code, let great code find you!  Add Codota to your java IDE