@Override public void done(ParseException e) { if (e == null) { // Add the latest results for this query to the cache. Log.d("PARSE_PIN_WIN", pinName); ParseObject.pinAllInBackground(pinName, data); } else { Log.d("PARSE_PIN_ERROR", e.toString()); } } });
public void done(ParseException e) { if (e == null) { try { // [ ] TODO: auto subscribe user to features with auto subscribe true Intent i = new Intent(SignUpEmailActivity.this, UserProfileActivity.class); i.putExtra("Name", name); i.putExtra("Email", email); i.putExtra("Password", password); i.putExtra("userAns", userAns); startActivity(i); overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left); } catch (Exception ex) { } } else { // TODO: Provide feedback and next steps to user when creation fails Snackbar.make(msnackbar, R.string.user_creation_failed, Snackbar.LENGTH_LONG).show(); Log.d(getResources().getString(R.string.user_creation_failed_message), e.toString()); } } });
@Override public void done(Profile profile, ParseException e) { if (e == null && profile != null) { // build object ParseGeoPoint pLocation = new ParseGeoPoint(); pLocation.setLatitude(latLng.latitude); pLocation.setLongitude(latLng.longitude); profile.setLocation(pLocation); // save to parse and pin locally for offline mode final ArrayList<Profile> profiles = new ArrayList<>(); profiles.add(profile); profile.saveInBackground(new SaveCallback() { @Override public void done(ParseException e) { if (e == null) { Log.d("LOCATION_SAVED", "on profile"); LocalDataStore.unpinAndRepin(profiles, LocalDataStore.PROFILE_PIN); } else { Log.d("LOCATION_NOT_SAVED", e.toString()); } } }); // TODO: Provide feedback to user if update fails } else if (profile == null) { Log.d("PROFILE_NULL", ""); } else { Log.d("PROFILE_ERROR", e.toString()); } } });
@Override public void done(ParseException e) { if (isActivityDestroyed()) { return; } loadingFinish(); if (e == null) { instructionsTextView .setText(R.string.com_parse_ui_login_help_email_sent); emailField.setVisibility(View.INVISIBLE); submitButton .setText(R.string.com_parse_ui_login_help_login_again_button_label); emailSent = true; } else { debugLog(getString(R.string.com_parse_ui_login_warning_password_reset_failed) + e.toString()); if (e.getCode() == ParseException.INVALID_EMAIL_ADDRESS || e.getCode() == ParseException.EMAIL_NOT_FOUND) { showToast(R.string.com_parse_ui_invalid_email_toast); } else { showToast(R.string.com_parse_ui_login_help_submit_failed_unknown); } } } });
@Override public void done(ParseException e) { if (isActivityDestroyed()) { return; } if (e == null) { loadingFinish(); signupSuccess(); } else { loadingFinish(); if (e != null) { debugLog(getString(R.string.com_parse_ui_login_warning_parse_signup_failed) + e.toString()); switch (e.getCode()) { case ParseException.INVALID_EMAIL_ADDRESS: showToast(R.string.com_parse_ui_invalid_email_toast); break; case ParseException.USERNAME_TAKEN: showToast(R.string.com_parse_ui_username_taken_toast); break; case ParseException.EMAIL_TAKEN: showToast(R.string.com_parse_ui_email_taken_toast); break; default: showToast(R.string.com_parse_ui_signup_failed_unknown_toast); } } } } });
showToast(R.string.com_parse_ui_facebook_login_failed_toast); debugLog(getString(R.string.com_parse_ui_login_warning_facebook_login_failed) + e.toString());