FirebaseUI-Android icon indicating copy to clipboard operation
FirebaseUI-Android copied to clipboard

Disable back press in Firebase Auth Phone

Open ArcherEmiya05 opened this issue 3 years ago • 2 comments

Welcome to FirebaseUI and thanks for submitting an issue!

Please take a look at open issues, as well as resolved issues, to see if your issue is either already being addressed, or has been solved by someone else.

If not, please feel free to fill in the following info so we can help faster!

Step 1: Are you in the right place?

Yes

Step 2: Describe your environment

  • Android device: Any
  • Android OS version: Any
  • Google Play Services version: Any
  • Firebase/Play Services SDK version: Any
  • FirebaseUI version: Any

Step 3: Describe the problem:

Using Firebase UI for Phone Auth only, how can we disable back press?

Steps to reproduce:

  1. Create a sample project
  2. Integrate Firebase UI SDK Android
  3. Use Phone auth provider
  4. Press back

Observed Results:

No way of controlling the back press with Phone Auth Activity

Expected Results:

Should allow to add OnBackPressedCallback to allow consumer to control the back press behavior.

Relevant Code:

Something like this

AuthUI.IdpConfig.PhoneBuilder().addBackPressCallback(backPressedCallback)

private val backPressedCallback = object : OnBackPressedCallback(true) {

      override fun handleOnBackPressed() {

         

      }

  }

ArcherEmiya05 avatar Aug 27 '22 22:08 ArcherEmiya05

Thanks for filing this feature request. I can't provide any timeline but we'll keep this issue open to gauge interest from the community!

sam-gc avatar Aug 29 '22 16:08 sam-gc