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

CustomTabsCallback

public class CustomTabsCallback
extends Object

java.lang.Object
   ↳ android.support.customtabs.CustomTabsCallback


A callback class for custom tabs client to get messages regarding events in their custom tabs. In the implementation, all callbacks are sent to the UI thread for the client.

Summary

Constants

int NAVIGATION_ABORTED

Sent when loading was aborted by a user action before it finishes like clicking on a link or refreshing the page.

int NAVIGATION_FAILED

Sent when the tab couldn't finish loading due to a failure.

int NAVIGATION_FINISHED

Sent when the tab has finished loading a page.

int NAVIGATION_STARTED

Sent when the tab has started loading a page.

int TAB_HIDDEN

Sent when the tab becomes hidden.

int TAB_SHOWN

Sent when the tab becomes visible.

Public constructors

CustomTabsCallback()

Public methods

void extraCallback(String callbackName, Bundle args)

Unsupported callbacks that may be provided by the implementation.

void onMessageChannelReady(Bundle extras)

Called when CustomTabsSession has requested a postMessage channel through requestPostMessageChannel(CustomTabsSessionToken, android.net.Uri) and the channel is ready for sending and receiving messages on both ends.

void onNavigationEvent(int navigationEvent, Bundle extras)

To be called when a navigation event happens.

void onPostMessage(String message, Bundle extras)

Called when a tab controlled by this CustomTabsSession has sent a postMessage.

void onRelationshipValidationResult(int relation, Uri requestedOrigin, boolean result, Bundle extras)

Called when a relationship validation result is available.

Inherited methods

From class java.lang.Object

Constants

added in version 24.1.0
int NAVIGATION_ABORTED

Sent when loading was aborted by a user action before it finishes like clicking on a link or refreshing the page.

Constant Value: 4 (0x00000004)

added in version 24.1.0
int NAVIGATION_FAILED

Sent when the tab couldn't finish loading due to a failure.

Constant Value: 3 (0x00000003)

added in version 24.1.0
int NAVIGATION_FINISHED

Sent when the tab has finished loading a page.

Constant Value: