Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

CustomTabsSessionToken

open class CustomTabsSessionToken
kotlin.Any
   ↳ androidx.browser.customtabs.CustomTabsSessionToken

Wrapper class that can be used as a unique identifier for a session. Also contains an accessor for the CustomTabsCallback for the session if there was any.

Summary

Public methods
open static CustomTabsSessionToken

Provides browsers a way to generate a mock CustomTabsSessionToken for testing purposes.

open Boolean
equals(other: Any?)

open CustomTabsCallback!

open static CustomTabsSessionToken!

Obtain a CustomTabsSessionToken from an intent.

open Int

open Boolean

Public methods

createMockSessionTokenForTesting

@NonNull open static fun createMockSessionTokenForTesting(): CustomTabsSessionToken

Provides browsers a way to generate a mock CustomTabsSessionToken for testing purposes.

Return
CustomTabsSessionToken: A mock token with no functionality.

equals

open fun equals(other: Any?): Boolean

getCallback

open fun getCallback(): CustomTabsCallback!
Return
CustomTabsCallback!: CustomTabsCallback corresponding to this session if there was any non-null callbacks passed by the client.

getSessionTokenFromIntent

open static fun getSessionTokenFromIntent(intent: Intent!): CustomTabsSessionToken!

Obtain a CustomTabsSessionToken from an intent. See CustomTabsIntent.Builder for ways to generate an intent for custom tabs.

Parameters
intent Intent!: The intent to generate the token from. This has to include an extra for CustomTabsIntent#EXTRA_SESSION.
Return
CustomTabsSessionToken!: The token that was generated.

hashCode

open fun hashCode(): Int

isAssociatedWith

open fun isAssociatedWith(session: CustomTabsSession!): Boolean
Return
Boolean: Whether this token is associated with the given session.