app/src/main/java/com/google/android/gms/fit/samples/DBLayout/ProxyDB.java
public HashMap<String, String> fetchdata(){

        SQLiteDatabase db = this.getWritableDatabase();

        String[] allcols = new String[]{Col_3_ONE, Col_4_ONE, Col_6_ONE, Col_7_ONE};

        Cursor cursor = db.query(TABLE_NAME_ONE, allcols, null, null, null, null, null);
        map = new HashMap<String, String>();


        for (cursor.moveToFirst(); !cursor.isAfterLast() ; cursor.moveToNext()){
            map.put(Col_3_ONE, cursor.getString(0).toString());
            map.put(Col_4_ONE, cursor.getString(1).toString());
            map.put(Col_6_ONE, cursor.getString(2).toString());
            map.put(Col_7_ONE, cursor.getString(3).toString());
        }
        Log.i("MAP:", map.toString());
        return map;

    }
//Fetch data from the database columns using a cursor
Fetch data from the database columns using a cursor
Fetch data from the database columns using a cursor
public HashMap<String, String> fetchdata(){
        SQLiteDatabase db = this.getWritableDatabase();
        String[] allcols = new String[]{Col_3_ONE, Col_4_ONE, Col_6_ONE, Col_7_ONE};
        Cursor cursor = db.query(TABLE_NAME_ONE, allcols, null, null, null, null, null);
        map = new HashMap<String, String>();
        for (cursor.moveToFirst(); !cursor.isAfterLast() ; cursor.moveToNext()){
            map.put(Col_3_ONE, cursor.getString(0).toString());
            map.put(Col_4_ONE, cursor.getString(1).toString());
            map.put(Col_6_ONE, cursor.getString(2).toString());
            map.put(Col_7_ONE, cursor.getString(3).toString());
        }
        Log.i("MAP:", map.toString());
        return map;
    }
public HashMap < String , String > fetchdata ( ) { SQLiteDatabase db = this . getWritableDatabase ( ) ; String [ ] allcols = new String [ ] { Col_3_ONE , Col_4_ONE , Col_6_ONE , Col_7_ONE } ; Cursor cursor = db . query ( TABLE_NAME_ONE , allcols , null , null , null , null , null ) ; map = new HashMap < String , String > ( ) ; for ( cursor . moveToFirst ( ) ; ! cursor . isAfterLast ( ) ; cursor . moveToNext ( ) ) { map . put ( Col_3_ONE , cursor . getString ( 0 ) . toString ( ) ) ; map . put ( Col_4_ONE , cursor . getString ( 1 ) . toString ( ) ) ; map . put ( Col_6_ONE , cursor . getString ( 2 ) . toString ( ) ) ; map . put ( Col_7_ONE , cursor . getString ( 3 ) . toString ( ) ) ; } Log . i ( "MAP:" , map . toString ( ) ) ; return map ; }
Fetch data from the database columns using a cursor
Fetch data from the database columns using a cursor