Ejemplo n.º 1
0
 public void createUser(User user) {
   ContentValues values = new ContentValues();
   values.put(DBConstUser.COLUMN_ID, user.getId());
   values.put(DBConstUser.COLUMN_IDENTIFIER, user.getIdentifier());
   values.put(DBConstUser.COLUMN_TOKEN, user.getToken());
   database.insert(DBConstUser.TABLE_NAME, null, values);
 }
Ejemplo n.º 2
0
 private User cursorToUser(Cursor cursor) {
   User user = new User(cursor.getString(0));
   user.setId(cursor.getString(1));
   user.setToken(cursor.getString(2));
   return user;
 }