app/src/main/java/com/google/android/gms/fit/samples/DBLayout/ProxyDB.java
public boolean insertDataT1(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.insert(TABLE_NAME_ONE,null ,cv);
        if(result == -1)
            return false;
        else
            return true;
    }
/*
    Inserting data into the usertable on the local device
     */
Inserting data into the usertable on the local device
Inserting data into the usertable on the local device
public boolean insertDataT1(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.insert(TABLE_NAME_ONE,null ,cv);
        if(result == -1)
            return false;
        else
            return true;
    }
public boolean insertDataT1 ( 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 . insert ( TABLE_NAME_ONE , null , cv ) ; if ( result == - 1 ) return false ; else return true ; }
Inserting data into the usertable on the local device
Inserting data into the usertable on the local device