Builder
class Builder
| kotlin.Any | |
| ↳ | android.app.AppInteractionAttribution.Builder |
Builder for AppInteractionAttribution.
Summary
| Public constructors | |
|---|---|
|
Creates a new instance of this builder class. |
|
| Public methods | |
|---|---|
| AppInteractionAttribution |
build()Builds the |
| AppInteractionAttribution.Builder |
setCustomInteractionType(customInteractionType: String)Sets the custom interaction type to describe the interaction. |
| AppInteractionAttribution.Builder |
setInteractionUri(interactionUri: Uri?)Sets a deeplink |
Public constructors
Builder
Builder(interactionType: Int)
Creates a new instance of this builder class.
| Parameters | |
|---|---|
interactionType |
Int: The interaction type. Must be one of AppInteractionAttribution.INTERACTION_TYPE_OTHER, AppInteractionAttribution.INTERACTION_TYPE_USER_QUERY, or AppInteractionAttribution.INTERACTION_TYPE_USER_SCHEDULED. If AppInteractionAttribution.INTERACTION_TYPE_OTHER is used, setCustomInteractionType(String) must also be called. Value is one of the following: |
Public methods
build
fun build(): AppInteractionAttribution
Builds the AppInteractionAttribution.
| Return | |
|---|---|
AppInteractionAttribution |
This value cannot be null. |
setCustomInteractionType
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
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. |