Package 

Class CheckPhoneHandler

    • Method Summary

      Modifier and Type Method Description
      void fetchCredential(Activity activity) Initiates the Phone Number Hint flow using the new API.
      void onActivityResult(Activity activity, int requestCode, int resultCode, @Nullable() Intent data) Handles the result from the Phone Number Hint flow.
      • Methods inherited from class com.firebase.ui.auth.viewmodel.AuthViewModelBase

        getCurrentUser, initializeForTesting
      • Methods inherited from class com.firebase.ui.auth.viewmodel.OperableViewModel

        getOperation
      • Methods inherited from class com.firebase.ui.auth.viewmodel.ViewModelBase

        init
      • Methods inherited from class androidx.lifecycle.AndroidViewModel

        getApplication
      • Methods inherited from class androidx.lifecycle.ViewModel

        addCloseable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CheckPhoneHandler

        CheckPhoneHandler(Application application)
    • Method Detail

      • fetchCredential

         void fetchCredential(Activity activity)

        Initiates the Phone Number Hint flow using the new API.

        This method creates a GetPhoneNumberHintIntentRequest and callsIdentity.getSignInClient(activity).getPhoneNumberHintIntent(request) to retrieve anIntentSender. The IntentSender is then wrapped in a PendingIntentRequiredException so thatthe caller can launch the hint flow.

        Note: Update your PendingIntentRequiredException to accept an IntentSenderrather than a PendingIntent.

        Parameters:
        activity - The activity used to retrieve the Phone Number Hint IntentSender.
      • onActivityResult

         void onActivityResult(Activity activity, int requestCode, int resultCode, @Nullable() Intent data)

        Handles the result from the Phone Number Hint flow.

        Call this method from your Activity's onActivityResult. It extracts the phone number from thereturned Intent and formats it.

        Parameters:
        activity - The activity used to process the returned Intent.
        requestCode - The request code (should match RequestCodes.CRED_HINT).
        resultCode - The result code from the hint flow.
        data - The Intent data returned from the hint flow.