Back to project page ExpertAndroid.
The source code is released under:
MIT License
If you think the Android project ExpertAndroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.iuriio.demos.expertandroid.ch13parsesimple; //from ww w. j a v a 2 s . c om import android.view.View; import com.parse.ParseException; import com.parse.ParseUser; import com.parse.RequestPasswordResetCallback; /** * Created by iuriio on 10/30/13. */ public class ResetPasswordActivity extends BaseActivity { private static final String TAG = "ResetPasswordActivity"; public ResetPasswordActivity() { super(TAG); } public void resetPassword(View view) { if (!this.validateForm()) { return; } String email = this.getEmail(); this.turnOnProgressDialog("Reset Password", "Wait while we send you email with password reset"); ParseUser.requestPasswordResetInBackground(email, new RequestPasswordResetCallback() { @Override public void done(ParseException e) { turnOffProgressDialog(); if (e == null) { reportSuccessfulReset(); } else { reportResetError(e); } } }); } private String getEmail() { return null; } private void reportSuccessfulReset() { this.gotoActivity(PasswordResetSuccessActivity.class); this.finish(); } private void reportResetError(ParseException e) { String error = e.getMessage(); this.alert("Reset Password", "Failed: " + error); } }