// Create a new user object from current UI inputs private User createUserFromInputs() { User user = new User(); user.firstName = mFirstNameEditText.getText().toString(); user.lastName = mLastNameEditText.getText().toString(); user.phone = mPhoneEditText.getText().toString(); user.id = AppPreferences.getString(this, AppPreferences.USER_ID); // TODO ADD IMAGE URL return user; }
// Save user in AppPreferences and on the server private void saveUser() { User user = createUserFromInputs(); User.storeUser(this, user, true); }