Code example for Location

Methods: getAccuracygetAltitudegetLatitudegetLongitudegetTimehasAccuracyhasAltitude

0
		return ret;	
	} 
	 
	public void addLocation(Location l) {
		ContentValues cv = new ContentValues();
		cv.put("latitude", l.getLatitude());
		cv.put("longitude", l.getLongitude());
		if(l.hasAltitude())
			cv.put("altitude", l.getAltitude());
		if(l.hasAccuracy())
			cv.put("accuracy", l.getAccuracy());
		cv.put("fixtime", l.getTime());
		dbh.insertOrThrow(LOCATION, null, cv);
	} 
	 
	public long countLocations() { 
		Cursor c = dbh.rawQuery("SELECT COUNT(*) FROM " + LOCATION, null);
		if(!c.moveToFirst())
			return 0; 
		long ret = c.getLong(0);
		c.close();