Code example for Location

Methods: getLatitudegetLongitudegetTime

0
		final SQLiteDatabase db = getWritableDatabase();
		db.execSQL("INSERT OR REPLACE INTO " + TABLE_CELLS + "(" + COL_VERSION
				+ ", " + COL_MCC + ", " + COL_MNC + ", " + COL_CID + ", "
				+ COL_TIME + ", " + COL_LATITUDE + ", " + COL_LONGITUDE
				+ ") VALUES ('" + LATEST_DATABASE_SCHEME_VERSION + "', '" + mcc
				+ "', '" + mnc + "', '" + cid + "', '" + location.getTime()
				+ "', '" + (long) (location.getLatitude() * 1E6) + "', '"
				+ (long) (location.getLongitude() * 1E6) + "')");
	} 
 
	public void insertWlanLocation(final String mac, final Location location) {
		newRequest = true;
		final SQLiteDatabase db = getWritableDatabase();
		db.execSQL("INSERT OR REPLACE INTO " + TABLE_WLANS + "(" + COL_VERSION
				+ ", " + COL_MAC + ", " + COL_TIME + ", " + COL_LATITUDE + ", "
				+ COL_LONGITUDE + ", " + COL_ACCURACY + ", " + COL_ALTITUDE
				+ ") VALUES (" + LATEST_DATABASE_SCHEME_VERSION + ", '" + mac
				+ "', " + location.getTime() + ", "
				+ (long) (location.getLatitude() * 1E6) + ", "
				+ (long) (location.getLongitude() * 1E6) + ", "
				+ (long) location.getAccuracy() + ", "