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.Builder
|
setCustomInteractionType(String customInteractionType)
Sets the custom interaction type to describe the interaction. |
AppInteractionAttribution.Builder
|
setInteractionUri(Uri interactionUri)
Sets a deeplink |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder (int interactionType)
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
public AppInteractionAttribution build ()
Builds the AppInteractionAttribution.
| Returns | |
|---|---|
AppInteractionAttribution |
This value cannot be null. |
setCustomInteractionType
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
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. |