Added in API level 37

Builder


class Builder
kotlin.Any
   ↳ android.app.AppInteractionAttribution.Builder

Builder for AppInteractionAttribution.

Summary

Public constructors
Builder(interactionType: Int)

Creates a new instance of this builder class.

Public methods
AppInteractionAttribution

Builds the AppInteractionAttribution.

AppInteractionAttribution.Builder
setCustomInteractionType(customInteractionType: String)

Sets the custom interaction type to describe the interaction.

AppInteractionAttribution.Builder
setInteractionUri(interactionUri: Uri?)

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

Public constructors

Public methods

build

Added in API level 37
fun build(): AppInteractionAttribution

Builds the AppInteractionAttribution.

Return
AppInteractionAttribution This value cannot be null.

setCustomInteractionType

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

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.
Return
AppInteractionAttribution.Builder This value cannot be null.
Exceptions
java.lang.IllegalArgumentException If the interaction type is not AppInteractionAttribution.INTERACTION_TYPE_OTHER.

setInteractionUri

Added in API level 37
fun setInteractionUri(interactionUri: Uri?): AppInteractionAttribution.Builder

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 android.content.Intent with the action android.content.Intent#ACTION_VIEW. To allow privacy settings to launch your activity, the target android.app.Activity must declare a corresponding <intent-filter> in your manifest.

Parameters
interactionUri Uri?: This value may be null.
Return
AppInteractionAttribution.Builder This value cannot be null.