テーブル構造をこれに変更します
private static final String CREATE_USER_TABLE = "CREATE TABLE IF NOT EXISTS " + TABLE_LOCATIONS + "("
+ UID + " TEXT PRIMARY KEY," + ADDRESS + " TEXT,"
+ LONGITUDE + " TEXT," + LATITUDE + " TEXT,
UNIQUE(" + LOGITUDE + "," + LATITUDE + ") ON CONFLICT REPLACE)";
次に、挿入を行うときは、以下の方法を使用します
ContentValues insertValues = new ContentValues();
insertValues.put(LATITUDE, latitude);
insertValues.put(LOGITUDE, longitude);
db.insertWithOnConflict(TABLE_LOCATIONS, null, insertValues, SQLiteDatabase.CONFLICT_REPLACE);