app/src/main/java/com/google/android/gms/fit/samples/DBLayout/ProxyDB.java
public boolean updateDataT1(String username, int age, int weight, String date, int stepgoal, int calgoal) {
        SQLiteDatabase db = this.getWritableDatabase();
        ContentValues cv = new ContentValues();
        cv.put(Col_2_ONE, username);
        cv.put(Col_3_ONE, age);
        cv.put(Col_4_ONE, weight);
        cv.put(Col_5_ONE, date);
        cv.put(Col_6_ONE, stepgoal);
        cv.put(Col_7_ONE, calgoal);
        long result = db.update(TABLE_NAME_ONE,cv, "username = ?",new String[] { username });
        if(result == -1)
            return false;
        else
            return true;
    }
/*
    Updating data in the table when user tries to change their goals or weight
     */
Updating data in the table when user tries to change their goals or weight
Updating data in the table when user tries to change their goals or weight
public boolean updateDataT1(String username, int age, int weight, String date, int stepgoal, int calgoal) {
        SQLiteDatabase db = this.getWritableDatabase();
        ContentValues cv = new ContentValues();
        cv.put(Col_2_ONE, username);
        cv.put(Col_3_ONE, age);
        cv.put(Col_4_ONE, weight);
        cv.put(Col_5_ONE, date);
        cv.put(Col_6_ONE, stepgoal);
        cv.put(Col_7_ONE, calgoal);
        long result = db.update(TABLE_NAME_ONE,cv, "username = ?",new String[] { username });
        if(result == -1)
            return false;
        else
            return true;
    }
public boolean updateDataT1 ( String username , int age , int weight , String date , int stepgoal , int calgoal ) { SQLiteDatabase db = this . getWritableDatabase ( ) ; ContentValues cv = new ContentValues ( ) ; cv . put ( Col_2_ONE , username ) ; cv . put ( Col_3_ONE , age ) ; cv . put ( Col_4_ONE , weight ) ; cv . put ( Col_5_ONE , date ) ; cv . put ( Col_6_ONE , stepgoal ) ; cv . put ( Col_7_ONE , calgoal ) ; long result = db . update ( TABLE_NAME_ONE , cv , "username = ?" , new String [ ] { username } ) ; if ( result == - 1 ) return false ; else return true ; }
Updating data in the table when user tries to change their goals or weight
Updating data in the table when user tries to change their goals or weight