AppInteractionAttribution.Builder


public static final class AppInteractionAttribution.Builder
extends Object

java.lang.Object
   ↳ android.app.AppInteractionAttribution.Builder


Builder for AppInteractionAttribution.

Summary

Public constructors

Builder(int interactionType)

Creates a new instance of this builder class.

Public methods

AppInteractionAttribution build()

Builds the AppInteractionAttribution.

AppInteractionAttribution.Builder setCustomInteractionType(String customInteractionType)

Sets the custom interaction type to describe the interaction.

AppInteractionAttribution.Builder setInteractionUri(Uri interactionUri)

Sets a deeplink Uri to the user request that initiated the interaction.

Inherited methods

Public constructors

Public methods

build

Added in API level 37
public AppInteractionAttribution build ()

Builds the AppInteractionAttribution.

Returns
AppInteractionAttribution This value cannot be null.

setCustomInteractionType

Added in API level 37
public AppInteractionAttribution.Builder setCustomInteractionType (String customInteractionType)

Sets the custom interaction type to describe the interaction.

This method must be called if and only if the interactionType provided to the constructor was AppInteractionAttribution.INTERACTION_TYPE_OTHER. The caller should define a set of string constants for these custom interaction types and set them here accordingly.

Parameters
customInteractionType String: This value cannot be null.

Returns
AppInteractionAttribution.Builder This value cannot be null.

Throws
IllegalArgumentException If the interaction type is not AppInteractionAttribution.INTERACTION_TYPE_OTHER.

setInteractionUri

Added in API level 37
public AppInteractionAttribution.Builder setInteractionUri (Uri interactionUri)

Sets a deeplink Uri to the user request that initiated the interaction.

When set, this URI can be used by privacy settings to display a link in the audit history, allowing users to navigate to the context of the original interaction.

For the link to be functional, the provided Uri must be resolvable by an Intent with the action Intent.ACTION_VIEW. To allow privacy settings to launch your activity, the target Activity must declare a corresponding <intent-filter> in your manifest.

Parameters
interactionUri Uri: This value may be null.

Returns
AppInteractionAttribution.Builder This value cannot be null.