Reputation: 129
how it possible to get callback after calling logInWithInBackground? currently I'm using below code for login but don't know how to get it success result.
Task<ParseUser> parseUserTask = ParseUser.logInWithInBackground("facebookaccountkit", authData);
I want to send user to another activity after successful login.
api links:
https://parseplatform.org/Parse-SDK-Android/api/com/parse/AuthenticationCallback.html
Upvotes: 0
Views: 335
Reputation: 11
You can use a continuation:
parseUserTask.continueWith(new Continuation<ParseUser, Void>() {
@Override
public Void then(bolts.Task<ParseUser> task) {
if(task.isCancelled()){
showError();
return null;
}
if (task.isFaulted()){
showError();
return null;
}
final ParseUser user = task.getResult();
//do something with the user
return null;
}
});
this is taken from Google OAuth Configuration
Upvotes: 1