Stay organized with collections
Save and categorize content based on your preferences.
ReceivingSessionStateCallback
@RequiresApi(value = 26) interface ReceivingSessionStateCallback : 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 functions |
Unit |
Called when transfer cannot complete.
|
Public functions
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\nKotlin \\|[Java](/reference/com/google/ambient/crossdevice/sessions/ReceivingSessionStateCallback \"View this page in Java\")\n\n\n```\n@RequiresApi(value = 26) interface ReceivingSessionStateCallback : 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/kotlin/com/google/ambient/crossdevice/sessions/Sessions#getReceivingSession(android.content.Intent,com.google.ambient.crossdevice.sessions.ReceivingSessionStateCallback)).\n\nSummary\n-------\n\n| ### Public functions ||\n|---------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Unit](/reference/kotlin/kotlin/Unit) | [onTransferFailure](/reference/kotlin/com/google/ambient/crossdevice/sessions/ReceivingSessionStateCallback#onTransferFailure(com.google.ambient.crossdevice.sessions.SessionId,com.google.ambient.crossdevice.sessions.SessionException))`(sessionId: `[SessionId](/reference/kotlin/com/google/ambient/crossdevice/sessions/SessionId)`, exception: `[SessionException](/reference/kotlin/com/google/ambient/crossdevice/sessions/SessionException)`)` Called when transfer cannot complete. |\n\nPublic functions\n----------------\n\n### onTransferFailure\n\n```\nfun onTransferFailure(sessionId: SessionId, exception: SessionException): Unit\n```\n\nCalled when transfer cannot complete. Failure reason described by `errorCode`"]]