/** * Unlinks this user from a third party authentication source. * <p/> * <strong>Note:</strong> This shouldn't be called directly unless developing a third party authentication * library. * * @param authType The name of the third party authentication source. * @return A {@code Task} is resolved when unlinking completes. * @see AuthenticationCallback */ public Task<Void> unlinkFromInBackground(final String authType) { if (authType == null) { return Task.forResult(null); } synchronized (mutex) { if (!getAuthData().containsKey(authType)) { return Task.forResult(null); } putAuthData(authType, null); } return saveInBackground(); }
@Override public void done(ParseException e) { currentUser.put(Message.PROFILE_KEY, userProfile); currentUser.saveInBackground(); } });
user.saveInBackground().continueWith(new Continuation<Void, Void>() { @Override public Void then(Task<Void> task) { user.saveInBackground().continueWith(new Continuation<Void, Void>() { @Override public Void then(Task<Void> task) {
@Override public void done(Profile p, ParseException e) { if (e == null) { // set profile on current user currentUser.put(Message.PROFILE_KEY, p); currentUser.saveInBackground(); // set default theme on user's profile p.setTheme(0); p.saveInBackground(); } } });
public void getStarted(View view){ String riderOrDriver = "rider"; if (riderOrDriverSwitch.isChecked()){ // **DRIVE MODE** riderOrDriver = "driver"; } else { // **RIDER MODE** riderOrDriver = "rider"; } //save the users option of rider/driver to parse then we redirectUser() ParseUser.getCurrentUser().put("riderOrDriver", riderOrDriver); ParseUser.getCurrentUser().saveInBackground(new SaveCallback() { @Override public void done(ParseException e) { if(e == null){ Log.i("MyApp", "user signed up"); redirectUser(); } else { } } }); }