added in version 24.1.0
belongs to Maven artifact com.android.support:customtabs:28.0.0-alpha1

CustomTabsSessionToken

public class CustomTabsSessionToken
extends Object

java.lang.Object
   ↳ android.support.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

static CustomTabsSessionToken createMockSessionTokenForTesting()

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

boolean equals(Object o)
CustomTabsCallback getCallback()
static CustomTabsSessionToken getSessionTokenFromIntent(Intent intent)

Obtain a CustomTabsSessionToken from an intent.

int hashCode()
boolean isAssociatedWith(CustomTabsSession session)

Inherited methods

From class java.lang.Object

Public methods

createMockSessionTokenForTesting

added in version 27.1.0
CustomTabsSessionToken createMockSessionTokenForTesting ()

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

Returns
CustomTabsSessionToken A mock token with no functionality.

equals

boolean equals (Object o)

Parameters
o Object

Returns
boolean

getCallback

added in version 24.1.0
CustomTabsCallback getCallback ()

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

getSessionTokenFromIntent

added in version 24.1.0
CustomTabsSessionToken getSessionTokenFromIntent (Intent intent)

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

int hashCode ()

Returns
int

isAssociatedWith

added in version 25.4.0
boolean isAssociatedWith (CustomTabsSession session)

Parameters
session CustomTabsSession

Returns
boolean Whether this token is associated with the given session.