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; //w w w . j a va2 s .c o m import android.app.Activity; import com.parse.ParseException; import com.parse.ParseUser; import com.parse.SignUpCallback; /** * Created by iuriio on 10/30/13. */ public class SignupActivity extends BaseActivity { private static final String TAG = "SignupActivity"; public SignupActivity() { super(TAG); } private void setViewsProperly() { ParseUser user = ParseUser.getCurrentUser(); if (user == null) { this.showLoggedOutView(); return; } this.showLoggedInView(); } private void showLoggedInView() { } private void showLoggedOutView() { } private void logOutFromParse() { ParseUser.logOut(); } private void signup(String userId, String email, String password) { ParseUser user = new ParseUser(); user.setUsername(userId); user.setEmail(email); user.setPassword(password); this.turnOnProgressDialog("Signup", "Please wait while we sign you up"); user.signUpInBackground(new SignUpCallback() { @Override public void done(ParseException e) { turnOffProgressDialog(); if (e == null) { signupSuccessful(); } else { signupFailed(e); } } }); } private void signupSuccessful() { } private void signupFailed(ParseException e) { String message = e.getMessage(); this.alert("Signup", "Failed: " + message); } }