Skip to content

Disable back press in Firebase Auth Phone #2058

@ArcherEmiya05

Description

@ArcherEmiya05

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() {

         

      }

  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions