Closed iman2420 closed 1 year ago
@iman2420, yes, that's right! Now SignUpActivity is not used. You can sign up with phone number via twitterDigits. SignUpActivity is a sketch. If you want to use SignUpActivity in your project, you should make signUp logic by your own.
@RomanPronin I use this code to signUp in background:
` public void signUpFromMainActivity() {
final QBUser user = new QBUser(App.MY_UNIQUE_ID, App.MY_UNIQUE_ID);
user.setWebsite(App.MY_UNIQUE_ID);
if (App.MY_EMAIL != null)
if (!App.MY_EMAIL.equals(""))
user.setEmail(App.MY_EMAIL);
user.setFullName(App.MY_NICK_NAME);
user.setPhone(App.MY_PHONE);
StringifyArrayList<String> tags = new StringifyArrayList<>();
tags.add(App.MY_SEX);
tags.add("iman2420tag");
// tags.add(App.MY_UNIQUE_ID);
user.setTags(tags);
QBUsers.signUpSignInTask(user).performAsync(new QBEntityCallback<QBUser>() {
@Override
public void onSuccess(QBUser qbUser, Bundle bundle) {
Log.e(TAG, "signUpFromMainActivity onSuccess " + qbUser.getLogin());
startMainActivity(qbUser);
}
@Override
public void onError(QBResponseException error) {
Log.e(TAG, "signUpFromMainActivity onError " + error.getMessage());
}
});
}`
But i got this error in Body:
BODY '{"errors":{"base":["Forbidden. Need user."]}}'
I need to signup by user/password . how to do it ?
@iman2420, in which request do you receive this response? Show us log with request and response.
@RomanPronin .I have already registered users in elsewhere. With this method:
`public void signUp() {
progressDialog.show();
final QBUser user = new QBUser(App.MY_UNIQUE_ID, App.MY_UNIQUE_ID);//Like 5752f5c215c8f5.60807023
user.setWebsite(App.MY_UNIQUE_ID);
if (App.MY_EMAIL != null)
if (!App.MY_EMAIL.equals(""))
user.setEmail(App.MY_EMAIL);
user.setFullName(App.MY_NICK_NAME);
user.setPhone(App.MY_PHONE);
StringifyArrayList<String> tags = new StringifyArrayList<String>();
tags.add(App.MY_SEX);
tags.add("iman2420tag");
// tags.add(App.MY_UNIQUE_ID);
user.setTags(tags);
QBUsers.signUpSignInTask(user).performAsync(new QBEntityCallback<QBUser>() {
@Override
public void onSuccess(QBUser qbUser, Bundle bundle) {
Log.e(TAG, "signUp onSuccess "+ qbUser.getLogin());
progressDialog.dismiss();
proceedToTheNextActivity();
}
@Override
public void onError(QBResponseException error) {
Log.e(TAG, "signUp onError "+ error.getMessage());
progressDialog.dismiss();
View rootLayout = findViewById(R.id.layout_root);
showSnackbarError(rootLayout, R.string.login_title, error, new View.OnClickListener() {
@Override
public void onClick(View v) {
createSession();
signUp();
}
});
if (error.getMessage() != null && error.getMessage().equals("Unauthorized")) {
}
}
});
}`
Now i want to login and redirect user to MainActivity with out going to LandingActivity. how to do it?
startSignUpActivity
not used in this link. AndSignUpButton
not found AND whenresultAction=signup_action
, command is NULL