Android APIs
public class

CustomTabsCallback

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

Class Overview

A callback class for custom tabs client to get messages regarding events in their custom tabs.

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.
Public Constructors
CustomTabsCallback()
Public Methods
void extraCallback(String callbackName, Bundle args)
Unsupported callbacks that may be provided by the implementation.
void onNavigationEvent(int navigationEvent, Bundle extras)
To be called when a navigation event happens.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final 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)

public static final int NAVIGATION_FAILED

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

Constant Value: 3 (0x00000003)

public static final int NAVIGATION_FINISHED

Sent when the tab has finished loading a page.

Constant Value: 2 (0x00000002)

public static final int NAVIGATION_STARTED

Sent when the tab has started loading a page.

Constant Value: 1 (0x00000001)

Public Constructors

public CustomTabsCallback ()

Public Methods

public void extraCallback (String callbackName, Bundle args)

Unsupported callbacks that may be provided by the implementation.

Note:Clients should never rely on this callback to be called and/or to have a defined behavior, as it is entirely implementation-defined and not supported.

This can be used by implementations to add extra callbacks, for testing or experimental purposes.

Parameters
callbackName Name of the extra callback.
args Arguments for the calback

public void onNavigationEvent (int navigationEvent, Bundle extras)

To be called when a navigation event happens.

Parameters
navigationEvent The code corresponding to the navigation event.
extras Reserved for future use.