Suggestion


@CarProtocol
public final class Suggestion


Suggestion that an application provide to an end user in order to be displayed by the host and allow then to interact with their application.

Examples When a user opens their navigation app, it can post a suggestion as for the next place to drive to rather than wait for the user to enter or search for it.

Summary

Nested types

public final class Suggestion.Builder

A builder of Suggestion.

Public methods

boolean
@Nullable PendingIntent

Returns the PendingIntent of the suggestion.

@Nullable CarIcon

Returns a CarIcon to display with the suggestion or null if not set.

@NonNull String

Returns the identifier of the suggestion.

@Nullable CarText

Returns the subtitle of the suggestion or null if not set.

@NonNull CarText

Returns the title of the suggestion.

int
@NonNull String

Public methods

equals

public boolean equals(@Nullable Object other)

getAction

Added in 1.3.0
public @Nullable PendingIntent getAction()

Returns the PendingIntent of the suggestion.

See also
setAction

getIcon

Added in 1.3.0
public @Nullable CarIcon getIcon()

Returns a CarIcon to display with the suggestion or null if not set.

See also
setIcon

getIdentifier

Added in 1.3.0
public @NonNull String getIdentifier()

Returns the identifier of the suggestion.

See also
setIdentifier

getSubtitle

Added in 1.3.0
public @Nullable CarText getSubtitle()

Returns the subtitle of the suggestion or null if not set.

See also
setSubtitle

getTitle

Added in 1.3.0
public @NonNull CarText getTitle()

Returns the title of the suggestion.

See also
setTitle

hashCode

public int hashCode()

toString

public @NonNull String toString()