Builder


class Builder
kotlin.Any
   ↳ android.app.personalcontext.insight.PromptInsight.Builder

Builder for PromptInsight.

Summary

Public constructors
Builder(displayDetails: InsightDisplayDetails)

Creates a new builder for a PromptInsight.

Public methods
PromptInsight

Builds the PromptInsight.

PromptInsight.Builder

Clears the count.

PromptInsight.Builder

Sets branding to show the source of this insight.

PromptInsight.Builder
setCount(count: Int)

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

PromptInsight.Builder

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

Public constructors

Builder

Builder(displayDetails: InsightDisplayDetails)

Creates a new builder for a PromptInsight.

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

Public methods

build

fun build(): PromptInsight

Builds the PromptInsight.

Return
PromptInsight This value cannot be null.

clearCount

fun clearCount(): PromptInsight.Builder

Clears the count.

Return
PromptInsight.Builder This value cannot be null.

setBranding

fun setBranding(branding: InsightBranding): PromptInsight.Builder

Sets branding to show the source of this insight.

Parameters
branding InsightBranding: This value cannot be null.
Return
PromptInsight.Builder This value cannot be null.

setCount

fun setCount(count: Int): PromptInsight.Builder

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.

Return
PromptInsight.Builder This value cannot be null.

setPromptIntent

fun setPromptIntent(promptIntent: PendingIntent?): PromptInsight.Builder

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

Parameters
promptIntent PendingIntent?: This value may be null.
Return
PromptInsight.Builder This value cannot be null.