{% include "/android/_dackka-meta-tags.html" %}

IncomingCallRetrieverClient

{% setvar page_path %}com/google/android/gms/auth/api/phone/IncomingCallRetrieverClient.html{% endsetvar %} {% setvar doc_root_path %}/android/reference{% endsetvar %} {% setvar can_switch %}1{% endsetvar %} {% include "android/_java_switcher2.md" %}

@DoNotMock(value = "Use canonical fakes instead.")
public interface IncomingCallRetrieverClient extends HasApiKey


A client for developers to instantiate incoming call retriever API.

Summary

Public methods

abstract @NonNull Task<@NonNull PendingIntent>
@RequiresApi(value = 29)
startIncomingCallRetriever(
    @NonNull IncomingCallRetrieverRequest incomingCallRetrieverRequest
)

Starts the incoming call retriever API, which rejects the first incoming call within the phone range provided in the IncomingCallRetrieverRequest within a timeout.

abstract @NonNull Task<@NonNull PendingIntent>

Initiates the user consent flow for the Incoming Call Retriever feature.

Public methods

startIncomingCallRetriever

@RequiresApi(value = 29)
abstract @NonNull Task<@NonNull PendingIntentstartIncomingCallRetriever(
    @NonNull IncomingCallRetrieverRequest incomingCallRetrieverRequest
)

Starts the incoming call retriever API, which rejects the first incoming call within the phone range provided in the IncomingCallRetrieverRequest within a timeout.

Parameters
@NonNull IncomingCallRetrieverRequest incomingCallRetrieverRequest

calling client needs to pass a corresponding IncomingCallRetrieverRequest instance. This contains a phone number range from which the incoming call is expected for verification.

Returns
@NonNull Task<@NonNull PendingIntent>

a PendingIntent to launch the user consent screen.

startUserConsent

@RequiresApi(value = 29)
abstract @NonNull Task<@NonNull PendingIntentstartUserConsent()

Initiates the user consent flow for the Incoming Call Retriever feature.

This method returns a Task which resolves with a PendingIntent. The caller should launch this PendingIntent to display the consent screen to the user.

Returns
@NonNull Task<@NonNull PendingIntent>

a Task to a PendingIntent to launch the user consent screen.