MobileApplication.BuilderBase


@ExperimentalAppSearchApi
public class MobileApplication.BuilderBase<T extends MobileApplication.BuilderBase<T>> extends Thing.BuilderBase

Known direct subclasses

Summary

Public constructors

Constructor for MobileApplication.BuilderBase with all the existing values of a MobileApplication.

BuilderBase(
    @NonNull String namespace,
    @NonNull String id,
    @NonNull String packageName,
    @NonNull byte[] sha256Certificate
)

Constructor for MobileApplication.BuilderBase.

Public methods

@NonNull MobileApplication

Builds the MobileApplication.

@NonNull T

Sets the class name.

@NonNull T

Sets the display name.

@NonNull T

Sets the icon uri.

@NonNull T
setUpdatedTimestampMillis(long updatedTimestampMillis)

Sets the last time the app was installed or updated on the device.

Inherited methods

From androidx.appsearch.builtintypes.Thing.BuilderBase
@NonNull T

Adds an alias for the item.

@NonNull T

Add a new action to the list of potential actions for this document.

@NonNull T

Clears the aliases, if any, for the item.

@NonNull T

Clear all the potential actions for this document.

void

If built, make a copy of previous data for every field so that the builder can be reused.

@NonNull T

Sets a list of aliases for the item.

@NonNull T
setCreationTimestampMillis(long creationTimestampMillis)

Sets the creation timestamp for the current AppSearch entity, in milliseconds using the currentTimeMillis time base.

@NonNull T

Sets the description for the item.

@NonNull T
setDocumentScore(int documentScore)

Sets the user-provided opaque document score of the current AppSearch document, which can be used for ranking using RANKING_STRATEGY_DOCUMENT_SCORE.

@NonNull T
setDocumentTtlMillis(long documentTtlMillis)

Sets the time-to-live (TTL) for the current AppSearch document as a duration in milliseconds.

@NonNull T

Sets the URL for an image of the item.

@NonNull T

Sets the name of the item.

@NonNull T

Sets a list of potential actions for this document.

@NonNull T

Sets the deeplink URL of the item.

Public constructors

BuilderBase

Added in 1.2.0-alpha02
public BuilderBase(@NonNull MobileApplication mobileApplication)

Constructor for MobileApplication.BuilderBase with all the existing values of a MobileApplication.

Parameters
@NonNull MobileApplication mobileApplication

The existing MobileApplication to copy values from.

BuilderBase

Added in 1.2.0-alpha02
public BuilderBase(
    @NonNull String namespace,
    @NonNull String id,
    @NonNull String packageName,
    @NonNull byte[] sha256Certificate
)

Constructor for MobileApplication.BuilderBase.

Parameters
@NonNull String namespace

The namespace of the document.

@NonNull String id

The id of the document.

@NonNull String packageName

The package name of the application.

@NonNull byte[] sha256Certificate

The SHA-256 certificate of the application.

Public methods

build

public @NonNull MobileApplication build()

Builds the MobileApplication.

setClassName

Added in 1.2.0-alpha02
public @NonNullsetClassName(@NonNull String className)

Sets the class name.

setDisplayName

Added in 1.2.0-alpha02
public @NonNullsetDisplayName(@NonNull String displayName)

Sets the display name.

setIconUri

Added in 1.2.0-alpha02
public @NonNullsetIconUri(@NonNull Uri iconUri)

Sets the icon uri.

setUpdatedTimestampMillis

Added in 1.2.0-alpha02
public @NonNullsetUpdatedTimestampMillis(long updatedTimestampMillis)

Sets the last time the app was installed or updated on the device.