Reputation: 1137
When I try to signup a new user, I get the error
No supported account linking service found
Here is my signup method
`public void createUser(View view) { String username = usernameEditText.getText().toString().trim(); String password = passwordEditText.getText().toString().trim();
// Set up a progress dialog
final ProgressDialog dialog = new ProgressDialog(SignupActivity.this);
dialog.setMessage(getString(R.string.progress_signup));
dialog.show();
// Set up a new Parse user
ParseUser user = new ParseUser();
user.setUsername(username);
user.setPassword(password);
// Call the Parse signup method
user.signUpInBackground(new SignUpCallback() {
@Override
public void done(ParseException e) {
dialog.dismiss();
if (e != null) {
// Show the error message
Toast.makeText(SignupActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();
} else {
// Start an intent for the dispatch activity
//Intent intent = new Intent(SignupActivity.this, DispatchActivity.class);
//intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
Toast.makeText(SignupActivity.this, "You signed up!", Toast.LENGTH_LONG).show();
//startActivity(intent);
}
}
});
}`
Here is my application:
public class ParseApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
// Initialize Crash Reporting.
ParseCrashReporting.enable(this);
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
// Add your initialization code here
Parse.initialize(this, "O4oL0sDxJz6tWKT7JqKJ7iaQ46kU356oMCWzLCkv", "QktMk3l5KKFYv1nna0dnYzmnHxHzeyqIaCOKVSod");
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
// Optionally enable public read access.
// defaultACL.setPublicReadAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
}
}
I don't want to link with anything, I just want to save a ParseUser. What am I doing wrong?
Upvotes: 0
Views: 486
Reputation: 553
First check to see if the automaticUser is logged in (or anyone else):
//Check if anyone is signed in
ParseUser currentUser = ParseUser.getCurrentUser();
if (currentUser != null) {
//Logged in, do something
} else {
//No user, create one
}
Also:
ParseUser.enableAutomaticUser(); //Will make app bug out
This is why, as you launch the app it thinks there is a user already logged in. Cheers
Upvotes: 1