public final class

ReportSystemUsageRequest.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.app.ReportSystemUsageRequest.Builder

Overview

Builder for ReportSystemUsageRequest objects.

Summary

Constructors
publicBuilder(java.lang.String packageName, java.lang.String databaseName, java.lang.String namespace, java.lang.String documentId)

Creates a ReportSystemUsageRequest.Builder instance.

Methods
public ReportSystemUsageRequestbuild()

Builds a new ReportSystemUsageRequest.

public ReportSystemUsageRequest.BuildersetUsageTimestampMillis(long usageTimestampMillis)

Sets the timestamp in milliseconds of the usage report (the time at which the document was used).

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(java.lang.String packageName, java.lang.String databaseName, java.lang.String namespace, java.lang.String documentId)

Creates a ReportSystemUsageRequest.Builder instance.

Parameters:

packageName: The package name of the app which owns the document that was used (such as from SearchResult.getPackageName()).
databaseName: The database in which the document that was used resides (such as from SearchResult.getDatabaseName()).
namespace: The namespace of the document that was used (such as from GenericDocument.getNamespace().
documentId: The ID of document that was used (such as from GenericDocument.getId().

Methods

public ReportSystemUsageRequest.Builder setUsageTimestampMillis(long usageTimestampMillis)

Sets the timestamp in milliseconds of the usage report (the time at which the document was used).

The value is in the currentTimeMillis time base.

If unset, this defaults to the current timestamp at the time that the ReportSystemUsageRequest is constructed.

Builds a new ReportSystemUsageRequest.