mirror of
https://github.com/Nezumi-2711/PRM392.git
synced 2026-09-23 04:09:54 +00:00
Validate Phone; Password, Forgot Password Function
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
package com.waterbase.foodify;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.firebase.database.DataSnapshot;
|
||||
import com.google.firebase.database.DatabaseError;
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.database.ValueEventListener;
|
||||
import com.waterbase.foodify.Model.User;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class ChangePassword extends AppCompatActivity {
|
||||
|
||||
User user;
|
||||
EditText edtPassword, edtPasswordVerify;
|
||||
String phone;
|
||||
Button btnChangePass;
|
||||
final String PASSWORD_PATTERN = "^(?=.*[0-9])(?=.*[A-Z])(?=.*[@#$%^&+=!])(?=\\S+$).{4,}$";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_change_password);
|
||||
|
||||
edtPassword = findViewById(R.id.edtPassword);
|
||||
edtPasswordVerify = findViewById(R.id.edtPasswordVerify);
|
||||
btnChangePass = findViewById(R.id.btnChangePass);
|
||||
|
||||
user = (User) getIntent().getSerializableExtra("user");
|
||||
phone = getIntent().getStringExtra("phone");
|
||||
|
||||
//Init Firebase
|
||||
FirebaseDatabase database = FirebaseDatabase.getInstance();
|
||||
final DatabaseReference table_user = database.getReference("User");
|
||||
|
||||
btnChangePass.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//Verify password
|
||||
Pattern patternPassword = Pattern.compile(PASSWORD_PATTERN);
|
||||
Matcher matcherPassword = patternPassword.matcher(edtPasswordVerify.getText().toString());
|
||||
|
||||
if (matcherPassword.matches() && edtPasswordVerify.getText().toString().length() >= 8) {
|
||||
|
||||
//Check same password
|
||||
if (edtPassword.getText().toString().equals(edtPasswordVerify.getText().toString())) {
|
||||
table_user.child(phone).child("password").setValue(edtPasswordVerify.getText().toString());
|
||||
Toast.makeText(ChangePassword.this, "Đổi mật khẩu thành công. Vui lòng đăng nhập lại để tiếp tục!", Toast.LENGTH_SHORT).show();
|
||||
startActivity(new Intent(ChangePassword.this, SignIn.class));
|
||||
finish();
|
||||
} else {
|
||||
edtPasswordVerify.setError("Mật khẩu không giống nhau. Vui lòng kiểm tra lại!");
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(ChangePassword.this, "Mật khẩu của bạn cần tối thiểu có 8 ký tự, 1 ký tự viết hoa, 1 số và 1 ký tự đặc biệt!", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.waterbase.foodify;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.firebase.FirebaseException;
|
||||
import com.google.firebase.auth.PhoneAuthCredential;
|
||||
import com.google.firebase.auth.PhoneAuthProvider;
|
||||
import com.google.firebase.database.DataSnapshot;
|
||||
import com.google.firebase.database.DatabaseError;
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.database.ValueEventListener;
|
||||
import com.waterbase.foodify.Common.Common;
|
||||
import com.waterbase.foodify.Model.User;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class ForgotPassword extends AppCompatActivity {
|
||||
|
||||
EditText edtPhone;
|
||||
ProgressBar progressBar;
|
||||
Button btnSendOTP;
|
||||
|
||||
final String PHONE_PATTERN = "^0[98753]{1}\\d{8}$";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_forgot_password);
|
||||
|
||||
btnSendOTP = findViewById(R.id.btnSendOTP);
|
||||
progressBar = findViewById(R.id.progressBar);
|
||||
edtPhone = findViewById(R.id.edtPhone);
|
||||
|
||||
//Init Firebase
|
||||
FirebaseDatabase database = FirebaseDatabase.getInstance();
|
||||
final DatabaseReference table_user = database.getReference("User");
|
||||
|
||||
btnSendOTP.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//Validate Phone Number
|
||||
Pattern patternPhone = Pattern.compile(PHONE_PATTERN);
|
||||
Matcher matcherPhone = patternPhone.matcher(edtPhone.getText().toString());
|
||||
if (matcherPhone.find()) {
|
||||
if (!TextUtils.isEmpty(edtPhone.getText().toString())) {
|
||||
//Check Internet
|
||||
if (Common.isConnectedToInternet(getBaseContext())) {
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
btnSendOTP.setVisibility(View.GONE);
|
||||
|
||||
//Get data from database
|
||||
table_user.addListenerForSingleValueEvent(new ValueEventListener() {
|
||||
@Override
|
||||
public void onDataChange(DataSnapshot dataSnapshot) {
|
||||
//Check phone in database
|
||||
if (dataSnapshot.child(edtPhone.getText().toString()).exists()) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSendOTP.setVisibility(View.VISIBLE);
|
||||
|
||||
PhoneAuthProvider.getInstance().verifyPhoneNumber(
|
||||
"+84" + edtPhone.getText().toString(),
|
||||
60,
|
||||
TimeUnit.SECONDS,
|
||||
ForgotPassword.this,
|
||||
new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {
|
||||
@Override
|
||||
public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSendOTP.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVerificationFailed(FirebaseException e) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSendOTP.setVisibility(View.VISIBLE);
|
||||
Toast.makeText(ForgotPassword.this, e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCodeSent(String verificationId, PhoneAuthProvider.ForceResendingToken forceResendingToken) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSendOTP.setVisibility(View.VISIBLE);
|
||||
Toast.makeText(ForgotPassword.this, "Mã OTP đã được gửi!", Toast.LENGTH_SHORT).show();
|
||||
Intent intent = new Intent(ForgotPassword.this, VerifyPhone.class);
|
||||
intent.putExtra("phone", edtPhone.getText().toString());
|
||||
intent.putExtra("verificationId", verificationId);
|
||||
intent.putExtra("isForgotPassword", "true");
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSendOTP.setVisibility(View.VISIBLE);
|
||||
Toast.makeText(ForgotPassword.this, "Số điện thoại này chưa được đăng ký. Vui lòng kiểm tra lại!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(DatabaseError databaseError) {
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Toast.makeText(ForgotPassword.this, "Vui lòng kiểm tra kết nối mạng!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(ForgotPassword.this, "Vui lòng điền đầy đủ thông tin!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
edtPhone.setError("Số điện thoại không đúng định dạng. Vui lòng kiểm tra lại");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class SignIn extends AppCompatActivity {
|
||||
|
||||
EditText edtPhone, edtPassword;
|
||||
Button btnSignIn;
|
||||
TextView txtAppName;
|
||||
TextView txtAppName, edtForgotPassword;
|
||||
CheckBox ckbRemember;
|
||||
|
||||
@Override
|
||||
@@ -39,6 +39,7 @@ public class SignIn extends AppCompatActivity {
|
||||
edtPhone = (EditText) findViewById(R.id.edtPhone);
|
||||
btnSignIn = (Button) findViewById(R.id.btnSignIn);
|
||||
ckbRemember = (CheckBox)findViewById(R.id.ckbRemember);
|
||||
edtForgotPassword = findViewById(R.id.forgotPassword);
|
||||
|
||||
//Init Paper
|
||||
Paper.init(this);
|
||||
@@ -109,6 +110,15 @@ public class SignIn extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//Set on click Forgot Password
|
||||
edtForgotPassword.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(SignIn.this, ForgotPassword.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void register(View view) {
|
||||
|
||||
@@ -30,13 +30,17 @@ import com.waterbase.foodify.Common.Common;
|
||||
import com.waterbase.foodify.Model.User;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class SignUp extends AppCompatActivity {
|
||||
|
||||
EditText edtPhone, edtName, edtPassword;
|
||||
EditText edtPhone, edtName, edtPassword, edtPasswordVerify;
|
||||
Button btnSignUp;
|
||||
TextView txtAppName;
|
||||
|
||||
final String PASSWORD_PATTERN = "^(?=.*[0-9])(?=.*[A-Z])(?=.*[@#$%^&+=!])(?=\\S+$).{4,}$";
|
||||
final String PHONE_PATTERN = "^0[98753]{1}\\d{8}$";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -45,6 +49,7 @@ public class SignUp extends AppCompatActivity {
|
||||
|
||||
edtName = (EditText) findViewById(R.id.txtFullName);
|
||||
edtPassword = (EditText) findViewById(R.id.edtPassword);
|
||||
edtPasswordVerify = (EditText) findViewById(R.id.edtPasswordVerify);
|
||||
edtPhone = (EditText) findViewById(R.id.edtPhone);
|
||||
btnSignUp = (Button) findViewById(R.id.btnSignUp);
|
||||
|
||||
@@ -62,70 +67,94 @@ public class SignUp extends AppCompatActivity {
|
||||
btnSignUp.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(!TextUtils.isEmpty(edtName.getText().toString()) && !TextUtils.isEmpty(edtPassword.getText().toString())
|
||||
&& !TextUtils.isEmpty(edtPhone.getText().toString())) {
|
||||
if (Common.isConnectedToInternet(getBaseContext())) {
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
btnSignUp.setVisibility(View.GONE);
|
||||
table_user.addListenerForSingleValueEvent(new ValueEventListener() {
|
||||
@Override
|
||||
public void onDataChange(DataSnapshot dataSnapshot) {
|
||||
//Check if already user phone
|
||||
if (dataSnapshot.child(edtPhone.getText().toString()).exists()) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSignUp.setVisibility(View.VISIBLE);
|
||||
Toast.makeText(SignUp.this, "Số điện thoại đã được đăng ký!", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
} else {
|
||||
//Success
|
||||
if (!TextUtils.isEmpty(edtName.getText().toString()) && !TextUtils.isEmpty(edtPassword.getText().toString())
|
||||
&& !TextUtils.isEmpty(edtPhone.getText().toString())) {
|
||||
|
||||
PhoneAuthProvider.getInstance().verifyPhoneNumber(
|
||||
"+84" + edtPhone.getText().toString(),
|
||||
60,
|
||||
TimeUnit.SECONDS,
|
||||
SignUp.this,
|
||||
new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {
|
||||
@Override
|
||||
public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSignUp.setVisibility(View.VISIBLE);
|
||||
}
|
||||
//Verify password
|
||||
Pattern patternPassword = Pattern.compile(PASSWORD_PATTERN);
|
||||
Matcher matcherPassword = patternPassword.matcher(edtPasswordVerify.getText().toString());
|
||||
|
||||
@Override
|
||||
public void onVerificationFailed(FirebaseException e) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSignUp.setVisibility(View.VISIBLE);
|
||||
Toast.makeText(SignUp.this, e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
if (matcherPassword.matches() && edtPasswordVerify.getText().toString().length() >= 8) {
|
||||
|
||||
@Override
|
||||
public void onCodeSent(String verificationId, PhoneAuthProvider.ForceResendingToken forceResendingToken) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSignUp.setVisibility(View.VISIBLE);
|
||||
User user = new User(edtName.getText().toString(), edtPassword.getText().toString());
|
||||
Intent intent = new Intent(SignUp.this, VerifyPhone.class);
|
||||
intent.putExtra("user", user);
|
||||
intent.putExtra("phone", edtPhone.getText().toString());
|
||||
intent.putExtra("verificationId", verificationId);
|
||||
startActivity(intent);
|
||||
}
|
||||
//Check same password
|
||||
if (edtPassword.getText().toString().equals(edtPasswordVerify.getText().toString())) {
|
||||
|
||||
//Validate Phone Number
|
||||
Pattern patternPhone = Pattern.compile(PHONE_PATTERN);
|
||||
Matcher matcherPhone = patternPhone.matcher(edtPhone.getText().toString());
|
||||
if (matcherPhone.find()) {
|
||||
|
||||
//Check Internet connection
|
||||
if (Common.isConnectedToInternet(getBaseContext())) {
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
btnSignUp.setVisibility(View.GONE);
|
||||
table_user.addListenerForSingleValueEvent(new ValueEventListener() {
|
||||
@Override
|
||||
public void onDataChange(DataSnapshot dataSnapshot) {
|
||||
|
||||
//Check if already user phone
|
||||
if (dataSnapshot.child(edtPhone.getText().toString()).exists()) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSignUp.setVisibility(View.VISIBLE);
|
||||
Toast.makeText(SignUp.this, "Số điện thoại đã được đăng ký!", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
} else {
|
||||
|
||||
//Success
|
||||
PhoneAuthProvider.getInstance().verifyPhoneNumber(
|
||||
"+84" + edtPhone.getText().toString(),
|
||||
60,
|
||||
TimeUnit.SECONDS,
|
||||
SignUp.this,
|
||||
new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {
|
||||
@Override
|
||||
public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSignUp.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVerificationFailed(FirebaseException e) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSignUp.setVisibility(View.VISIBLE);
|
||||
Toast.makeText(SignUp.this, e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCodeSent(String verificationId, PhoneAuthProvider.ForceResendingToken forceResendingToken) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnSignUp.setVisibility(View.VISIBLE);
|
||||
User user = new User(edtName.getText().toString(), edtPassword.getText().toString());
|
||||
Intent intent = new Intent(SignUp.this, VerifyPhone.class);
|
||||
intent.putExtra("user", user);
|
||||
intent.putExtra("phone", edtPhone.getText().toString());
|
||||
intent.putExtra("verificationId", verificationId);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(DatabaseError databaseError) {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Toast.makeText(SignUp.this, "Vui lòng kiểm tra kết nối mạng!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
edtPhone.setError("Số điện thoại không đúng định dạng. Vui lòng kiểm tra lại!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(DatabaseError databaseError) {
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
edtPasswordVerify.setError("Mật khẩu không giống nhau! Vui lòng kiểm tra lại");
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(SignUp.this, "Vui lòng kiểm tra kết nối mạng!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
Toast.makeText(SignUp.this, "Mật khẩu của bạn cần tối thiểu có 8 ký tự, 1 ký tự viết hoa, 1 số và 1 ký tự đặc biệt!", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(SignUp.this, "Vui lòng điền đầy đủ thông tin!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
|
||||
@@ -15,6 +15,7 @@ import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.firebase.ui.database.ChangeEventListener;
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.firebase.FirebaseException;
|
||||
@@ -35,7 +36,7 @@ public class VerifyPhone extends AppCompatActivity {
|
||||
|
||||
private EditText inputCode1, inputCode2, inputCode3, inputCode4, inputCode5, inputCode6;
|
||||
User user = null;
|
||||
String verificationId, phone;
|
||||
String verificationId, phone, isForgotPassword = null;
|
||||
TextView resendCode, countdown;
|
||||
|
||||
@Override
|
||||
@@ -45,9 +46,10 @@ public class VerifyPhone extends AppCompatActivity {
|
||||
|
||||
user = (User) getIntent().getSerializableExtra("user");
|
||||
phone = getIntent().getStringExtra("phone");
|
||||
isForgotPassword = getIntent().getStringExtra("isForgotPassword");
|
||||
|
||||
TextView textView = findViewById(R.id.txtPhone);
|
||||
textView.setText("Mã xác thực đã gửi đến số " + String.format("+84-%s", phone) + ". Vui lòng nhập mã OTP khi nhận được tin nhắn!");
|
||||
textView.setText("Mã xác thực đã gửi đến số " + phone + ". Vui lòng nhập mã OTP khi nhận được tin nhắn!");
|
||||
|
||||
inputCode1 = findViewById(R.id.inputCode1);
|
||||
inputCode2 = findViewById(R.id.inputCode2);
|
||||
@@ -157,12 +159,25 @@ public class VerifyPhone extends AppCompatActivity {
|
||||
table_user.addListenerForSingleValueEvent(new ValueEventListener() {
|
||||
@Override
|
||||
public void onDataChange(DataSnapshot dataSnapshot) {
|
||||
table_user.child(getIntent().getStringExtra("phone")).setValue(user);
|
||||
Intent intent = new Intent(getApplicationContext(), SignIn.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
if(isForgotPassword == null){
|
||||
|
||||
Toast.makeText(VerifyPhone.this, "Tạo tài khoản thành công! Vui lòng đăng nhập lại để tiếp tục", Toast.LENGTH_SHORT).show();
|
||||
startActivity(intent);
|
||||
//Create new User
|
||||
table_user.child(getIntent().getStringExtra("phone")).setValue(user);
|
||||
Intent intent = new Intent(getApplicationContext(), SignIn.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
|
||||
Toast.makeText(VerifyPhone.this, "Tạo tài khoản thành công! Vui lòng đăng nhập lại để tiếp tục", Toast.LENGTH_SHORT).show();
|
||||
startActivity(intent);
|
||||
finish();
|
||||
} else {
|
||||
|
||||
//Change pass user
|
||||
Intent intent = new Intent(VerifyPhone.this, ChangePassword.class);
|
||||
intent.putExtra("user", user);
|
||||
intent.putExtra("phone", phone);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -170,13 +185,6 @@ public class VerifyPhone extends AppCompatActivity {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// //-------------------------------------------------------
|
||||
// User user = new User(edtName.getText().toString(), edtPassword.getText().toString());
|
||||
// table_user.child(edtPhone.getText().toString()).setValue(user);
|
||||
// Toast.makeText(SignUp.this, "Đăng ký thành công!", Toast.LENGTH_SHORT).show();
|
||||
// finish();
|
||||
// //--------------------------------------------------------
|
||||
} else {
|
||||
Toast.makeText(VerifyPhone.this, "Mã code không đúng. Vui lòng kiểm tra lại!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user