Stay organized with collections
Save and categorize content based on your preferences.
ReceivingSessionStateCallback
@RequiresApi(value = 26) interface ReceivingSessionStateCallback extends SessionStateCallback
Clients of Sessions should implement ReceivingSessionStateCallback
to receive notifications of Session state changes when transferring a Session.
Provide your implementation in Sessions.getReceivingSession
.
Summary
Public methods |
abstract void |
Called when transfer cannot complete.
|
Public methods
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ReceivingSessionStateCallback\n=============================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/com/google/ambient/crossdevice/sessions/ReceivingSessionStateCallback \"View this page in Kotlin\") \\|Java\n\n\n```\n@RequiresApi(value = 26) interface ReceivingSessionStateCallback extends SessionStateCallback\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nClients of Sessions should implement `ReceivingSessionStateCallback` to receive notifications of Session state changes when transferring a Session.\n\nProvide your implementation in [Sessions.getReceivingSession](/reference/com/google/ambient/crossdevice/sessions/Sessions#getReceivingSession(android.content.Intent,com.google.ambient.crossdevice.sessions.ReceivingSessionStateCallback)).\n\nSummary\n-------\n\n| ### Public methods ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `abstract void` | [onTransferFailure](/reference/com/google/ambient/crossdevice/sessions/ReceivingSessionStateCallback#onTransferFailure(com.google.ambient.crossdevice.sessions.SessionId,com.google.ambient.crossdevice.sessions.SessionException))`(` ` @`[NonNull](/reference/androidx/annotation/NonNull)` `[SessionId](/reference/com/google/ambient/crossdevice/sessions/SessionId)` sessionId,` ` @`[NonNull](/reference/androidx/annotation/NonNull)` `[SessionException](/reference/com/google/ambient/crossdevice/sessions/SessionException)` exception` `)` Called when transfer cannot complete. |\n\nPublic methods\n--------------\n\n### onTransferFailure\n\n```\nabstract void onTransferFailure(\n @NonNull SessionId sessionId,\n @NonNull SessionException exception\n)\n```\n\nCalled when transfer cannot complete. Failure reason described by `errorCode`"]]