diff --git a/app/src/main/java/org/linphone/assistant/CreateAccountFragment.java b/app/src/main/java/org/linphone/assistant/CreateAccountFragment.java index 213adc89c..f44c021a9 100644 --- a/app/src/main/java/org/linphone/assistant/CreateAccountFragment.java +++ b/app/src/main/java/org/linphone/assistant/CreateAccountFragment.java @@ -338,7 +338,8 @@ public class CreateAccountFragment extends Fragment addAlias(); } else { if (mUseEmail.isChecked()) mAccountCreator.setPhoneNumber(null, null); - if (getUsername().length() > 0) { + if (mAccountCreator.getUsername() != null + && mAccountCreator.getUsername().length() > 0) { mAccountCreator.isAccountExist(); } else { LinphoneUtils.displayErrorAlert( @@ -541,6 +542,13 @@ public class CreateAccountFragment extends Fragment } else { mSelectCountry.setText(R.string.select_your_country); } + } else { + mAccountCreator.setPhoneNumber( + mAccountCreator.getPhoneNumber(), + mDialCode.getText().toString()); + if (!mUseUsername.isChecked()) { + mAccountCreator.setUsername(mAccountCreator.getPhoneNumber()); + } } } @@ -745,7 +753,7 @@ public class CreateAccountFragment extends Fragment || !getResources().getBoolean(R.bool.use_phone_number_validation)) { // mAccountCreator.activateAccount(); // Resend email TODO } else { - accountCreator.recoverAccount(); // Resend SMS + accountCreator.createAccount(); } } else { mCreateAccount.setEnabled(true); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7c725b8c1..08ae3869b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -102,7 +102,7 @@ Echo canceler calibration in progress Enter your login Your account has not been validated yet. - The confirmation code is invalid.\r\nPlease try again. + The confirmation code is invalid.\nPlease try again. Your account has been validated. Incorrect username or password Do you agree to download OpenH264 Video Codec provided by Cisco Systems, Inc.? @@ -114,13 +114,13 @@ An error occurred, try again later. Server unreachable, verify your network connection. This username is already taken. - This phone number is already used.\r\nPlease type a different number.\r\nYou can delete your existing account if you want to reuse your phone number. + This phone number is already used.\nPlease type a different number.\nYou can delete your existing account if you want to reuse your phone number. Your username is invalid. Your phone number is invalid. Your email is invalid. Your password is invalid Passwords do not match. - Your username will be %s.\r\n\r\nIt may differ from your input to match requirements.\r\nDo you accept? + Your username will be %s.\n\nIt may differ from your input to match requirements.\nDo you accept? Please enter your login and password Forgot password ? Choose a country