{% setvar book_path %}/android/reference/kotlin/_book.yaml{% endsetvar %} {% 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/_kotlin_switcher2.md" %}

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


A client for developers to instantiate incoming call retriever API.

Summary

Public functions

Task<PendingIntent>
@RequiresApi(value = 29)
startIncomingCallRetriever(
    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.

Task<PendingIntent>

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

Public functions

startIncomingCallRetriever

@RequiresApi(value = 29)
fun startIncomingCallRetriever(
    incomingCallRetrieverRequest: IncomingCallRetrieverRequest
): Task<PendingIntent>

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

Parameters
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
Task<PendingIntent>

a PendingIntent to launch the user consent screen.

startUserConsent

@RequiresApi(value = 29)
fun startUserConsent(): Task<PendingIntent>

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
Task<PendingIntent>

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