diff --git a/Android/app/src/main/java/com/whatsapp/otp/sample/app/fragment/OtpValidatorFragment.java b/Android/app/src/main/java/com/whatsapp/otp/sample/app/fragment/OtpValidatorFragment.java index a514b1d..c497efa 100644 --- a/Android/app/src/main/java/com/whatsapp/otp/sample/app/fragment/OtpValidatorFragment.java +++ b/Android/app/src/main/java/com/whatsapp/otp/sample/app/fragment/OtpValidatorFragment.java @@ -122,9 +122,7 @@ public void onResume() { this.fillCode(extras); this.showDebugMessages(extras); String filledCode = binding.otpCodeInputId.getText().toString(); - if (!filledCode.isEmpty()) { - binding.validateOtp.callOnClick(); - } else { + if (filledCode.isEmpty()) { listenForCodeToAutoSubmit(); } } @@ -136,10 +134,6 @@ public void onReceive(Context context, Intent intent) { if (intent != null) { String code = intent.getStringExtra("code"); OtpValidatorFragment.this.binding.otpCodeInputId.setText(code); - FragmentActivity activity = getActivity(); - if (activity != null && isAdded()) { - OtpValidatorFragment.this.binding.validateOtp.callOnClick(); - } } } };