CustomContentAction


@ExperimentalCustomContentAction
public final class CustomContentAction


Represents a custom action that can be invoked on specific content types (image or link) within a Custom Tab. Instances of this class are created using CustomContentAction.Builder and added to a CustomTabsIntent using addCustomContentAction.

Summary

Nested types

public final class CustomContentAction.Builder

Builder class for CustomContentAction objects.

Public methods

getId

Added in 1.9.0
public int getId()
Returns
int

The unique ID for this action.

getLabel

Added in 1.9.0
public @NonNull String getLabel()
Returns
@NonNull String

The user-visible label for this action.

getPendingIntent

Added in 1.9.0
public @NonNull PendingIntent getPendingIntent()
Returns
@NonNull PendingIntent

The PendingIntent to be sent when this action is triggered.

getTargetType

Added in 1.9.0
public int getTargetType()
Returns
int

The type of content this action applies to.