CustomTabsSessionToken


class 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 functions

java-static CustomTabsSessionToken

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

Boolean
equals(o: Any!)
CustomTabsCallback?
java-static CustomTabsSessionToken?

Obtain a CustomTabsSessionToken from an intent.

Int
Boolean

Public functions

createMockSessionTokenForTesting

Added in 1.2.0
java-static fun createMockSessionTokenForTesting(): CustomTabsSessionToken

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

Returns
CustomTabsSessionToken

A mock token with no functionality.

equals

fun equals(o: Any!): Boolean

getCallback

Added in 1.2.0
fun getCallback(): CustomTabsCallback?
Returns
CustomTabsCallback?

CustomTabsCallback corresponding to this session if there was any non-null callbacks passed by the client.

getSessionTokenFromIntent

Added in 1.2.0
java-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 EXTRA_SESSION.

Returns
CustomTabsSessionToken?

The token that was generated.

hashCode

fun hashCode(): Int

isAssociatedWith

Added in 1.2.0
fun isAssociatedWith(session: CustomTabsSession): Boolean
Returns
Boolean

Whether this token is associated with the given session.