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 Build a Self-Destructing Message Android App Adding Users Using Parse.com Creating a New User on Parse

This challenge is asking me to use the Log.e method but I am using and still marks it as an error or am i crazy?

SignUpActivity.java
import android.app.Activity;
import android.util.Log;
import com.parse.ParseUser;
import com.parse.ParseException;
import com.parse.SignUpCallback;

public class SignUpActivity extends Activity {

    public static final String TAG = SignUpActivity.class.getSimpleName();

    protected SignUpCallback mSignUpCallback = new SignUpCallback() {
        @Override
        public void done(ParseException e) {

        }
    };

    // onCreate() and other code has been omitted

    protected void signUp(String username, String password) {
      ParseUser newUser = new ParseUser();
      newUser.setUsername(username);
      newUser.setPassword(password);
      newUser.signUpInBackground(new SignUpCallback() {
        @Override
        public void done(ParseException e) {
          if(e==null){
          }
          else{
            Log.e(TAG, "Error");
          }
        }
      });
    }
}

1 Answer

Harry James
Harry James
14,780 Points

You've got it right Alejandro!

You just put it in the wrong place! Instead of creating your own done() method, type the code into the

public void done(ParseException e) {

method on line 13.

Then, you'll pass the challenge! :)

P.S: You're not crazy! ;)