From a2d9dc3ee4463cd687bc9bf8e148b1658ac3d3b0 Mon Sep 17 00:00:00 2001 From: Sarthak9504 Date: Thu, 5 Oct 2023 01:49:56 +0530 Subject: [PATCH 1/2] Type: fix Subject: Fix the Mobile(OTP) not working effectively Body: The users were able to navigate to the next page without entering the OTP, so there needed to be a provision to check whether user has entered the OTP before verifying --- .../ui/MobileVerificationActivity.java | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/registration/ui/MobileVerificationActivity.java b/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/registration/ui/MobileVerificationActivity.java index 8f1b7a3b5..10d18be81 100644 --- a/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/registration/ui/MobileVerificationActivity.java +++ b/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/registration/ui/MobileVerificationActivity.java @@ -112,20 +112,24 @@ public void onRequestOtpFailed(String s) { public void onNextClicked() { Utils.hideSoftKeyboard(this); - mFabNext.setClickable(false); - mProgressBar.setVisibility(View.VISIBLE); - mTvVerifyingOtp.setVisibility(View.VISIBLE); - mEtOtp.setClickable(false); - mEtOtp.setFocusableInTouchMode(false); - mEtOtp.setFocusable(false); - - Handler handler = new Handler(); - handler.postDelayed(new Runnable() { - @Override - public void run() { - mMobileVerificationPresenter.verifyOTP(mEtOtp.getText().toString().trim()); - } - }, 1500); + if (mEtOtp.getText().toString().trim().isEmpty()) { + showToast("OTP not Entered"); + } else { + mFabNext.setClickable(false); + mProgressBar.setVisibility(View.VISIBLE); + mTvVerifyingOtp.setVisibility(View.VISIBLE); + mEtOtp.setClickable(false); + mEtOtp.setFocusableInTouchMode(false); + mEtOtp.setFocusable(false); + + Handler handler = new Handler(); + handler.postDelayed(new Runnable() { + @Override + public void run() { + mMobileVerificationPresenter.verifyOTP(mEtOtp.getText().toString().trim()); + } + }, 1500); + } } @Override From ba8345880ce974c09868862df65f125ea8470dc9 Mon Sep 17 00:00:00 2001 From: Sarthak9504 Date: Thu, 5 Oct 2023 02:17:50 +0530 Subject: [PATCH 2/2] Type: fix Subject: Fix the Mobile(OTP) not working effectively Body: The users were able to navigate to the next page without entering the OTP, so there needed to be a provision to check whether user has entered the OTP before verifying --- .../mifospay/registration/ui/MobileVerificationActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/registration/ui/MobileVerificationActivity.java b/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/registration/ui/MobileVerificationActivity.java index 10d18be81..6c537dc13 100644 --- a/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/registration/ui/MobileVerificationActivity.java +++ b/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/registration/ui/MobileVerificationActivity.java @@ -114,6 +114,7 @@ public void onNextClicked() { if (mEtOtp.getText().toString().trim().isEmpty()) { showToast("OTP not Entered"); + mEtOtp.requestFocus(); } else { mFabNext.setClickable(false); mProgressBar.setVisibility(View.VISIBLE);