Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

The ParseUser call return exception invalid email

This is my extract code below. The code is not creating new user on parse but returns invalid email. i added log and shows that it returns exception invalid email

final ParseUser newUser = new ParseUser();

    newUser.setUsername(nAme);
    newUser.setPassword(eMail);
    newUser.setEmail(pAssword);



    new android.os.Handler().postDelayed(
            new Runnable() {
                public void run() {
                    Log.d(TAG, "On complete call either onSignupSuccess or onSignupFailed");
                    // On complete call either onSignupSuccess or onSignupFailed
                    newUser.signUpInBackground(new SignUpCallback() {

                        @Override
                        public void done(ParseException e) {
                            setProgressBarIndeterminateVisibility(false);
                            if(e == null){
                                // depending on success

                                onSignupSuccess();

                            }else{
                                Log.d(TAG, "builder to say failed ");

                                builder = new AlertDialog.Builder(SignupActivity.this);
                                builder.setMessage(e.getMessage())
                                        .setTitle(R.string.sign_up_error_title)
                                        .setPositiveButton(android.R.string.ok, null);
                                onSignupFailed();

                                progressDialog.dismiss();
                            }
                        }


                    });


                }
            }, 3000);