EngagementSignalsCallback
public interface EngagementSignalsCallback
A callback class for custom tabs clients to get messages regarding the user's engagement with the webpage within their custom tabs. These methods may not be called for some webpages. In the implementation, all callbacks are sent to the Executor provided by the client or its UI thread if one is not provided.
Summary
Public methods |
|
|---|---|
default void |
onGreatestScrollPercentageIncreased(Called when a user has reached a greater scroll percentage on the page. |
default void |
onSessionEnded(boolean didUserInteract, @NonNull Bundle extras)Called when a |
default void |
onVerticalScrollEvent(boolean isDirectionUp, @NonNull Bundle extras)Called when a user scrolls the tab. |
Public methods
onGreatestScrollPercentageIncreased
default void onGreatestScrollPercentageIncreased(
@IntRange(from = 1, to = 100) int scrollPercentage,
@NonNull Bundle extras
)
Called when a user has reached a greater scroll percentage on the page. The greatest scroll percentage is reset if the user navigates to a different page. If the current page's total height changes, this method will be called again only if the scroll progress reaches a higher percentage based on the new and current height of the page.
onSessionEnded
default void onSessionEnded(boolean didUserInteract, @NonNull Bundle extras)
Called when a CustomTabsSession is ending or when no further Engagement Signals callbacks are expected to report whether any user action has occurred during the session.
onVerticalScrollEvent
default void onVerticalScrollEvent(boolean isDirectionUp, @NonNull Bundle extras)
Called when a user scrolls the tab.