PromptInsight.Builder


public static final class PromptInsight.Builder
extends Object

java.lang.Object
   ↳ android.app.personalcontext.insight.PromptInsight.Builder


Builder for PromptInsight.

Summary

Public constructors

Builder(InsightDisplayDetails displayDetails)

Creates a new builder for a PromptInsight.

Public methods

PromptInsight build()

Builds the PromptInsight.

PromptInsight.Builder clearCount()

Clears the count.

PromptInsight.Builder setBranding(InsightBranding branding)

Sets branding to show the source of this insight.

PromptInsight.Builder setCount(int count)

Sets the number of options that will be prompted if known ahead of time.

PromptInsight.Builder setPromptIntent(PendingIntent promptIntent)

Sets the PendingIntent to launch when the user interacts with the prompt.

Inherited methods

Public constructors

Builder

Added in version 37.2
public Builder (InsightDisplayDetails displayDetails)

Creates a new builder for a PromptInsight.

Parameters
displayDetails InsightDisplayDetails: the display details of the insight.
This value cannot be null.

Public methods

build

Added in version 37.2
public PromptInsight build ()

Builds the PromptInsight.

Returns
PromptInsight This value cannot be null.

clearCount

Added in version 37.2
public PromptInsight.Builder clearCount ()

Clears the count.

Returns
PromptInsight.Builder This value cannot be null.

setBranding

Added in version 37.2
public PromptInsight.Builder setBranding (InsightBranding branding)

Sets branding to show the source of this insight.

Parameters
branding InsightBranding: This value cannot be null.

Returns
PromptInsight.Builder This value cannot be null.

setCount

Added in version 37.2
public PromptInsight.Builder setCount (int count)

Sets the number of options that will be prompted if known ahead of time. By default, there will be no count provided. If provided, it must be greater than 0.

Parameters
count int

Returns
PromptInsight.Builder This value cannot be null.

setPromptIntent

Added in version 37.2
public PromptInsight.Builder setPromptIntent (PendingIntent promptIntent)

Sets the PendingIntent to launch when the user interacts with the prompt.

Parameters
promptIntent PendingIntent: This value may be null.

Returns
PromptInsight.Builder This value cannot be null.