Builder
class Builder
kotlin.Any | |
↳ | android.app.appsearch.ReportSystemUsageRequest.Builder |
Builder for ReportSystemUsageRequest
objects.
Summary
Public constructors | |
---|---|
Creates a |
Public methods | |
---|---|
ReportSystemUsageRequest |
build() Builds a new |
ReportSystemUsageRequest.Builder |
setUsageTimestampMillis(usageTimestampMillis: Long) Sets the timestamp in milliseconds of the usage report (the time at which the document was used). |
Public constructors
Builder
Builder(
packageName: String,
databaseName: String,
namespace: String,
documentId: String)
Creates a ReportSystemUsageRequest.Builder
instance.
Parameters | |
---|---|
packageName |
String: The package name of the app which owns the document that was used (such as from SearchResult#getPackageName ). This value cannot be null . |
databaseName |
String: The database in which the document that was used resides (such as from SearchResult#getDatabaseName ). This value cannot be null . |
namespace |
String: The namespace of the document that was used (such as from android.app.appsearch.GenericDocument#getNamespace . This value cannot be null . |
documentId |
String: The ID of document that was used (such as from android.app.appsearch.GenericDocument#getId . This value cannot be null . |
Public methods
build
fun build(): ReportSystemUsageRequest
Builds a new ReportSystemUsageRequest
.
Return | |
---|---|
ReportSystemUsageRequest |
This value cannot be null . |
setUsageTimestampMillis
fun setUsageTimestampMillis(usageTimestampMillis: Long): ReportSystemUsageRequest.Builder
Sets the timestamp in milliseconds of the usage report (the time at which the document was used).
The value is in the System#currentTimeMillis
time base.
If unset, this defaults to the current timestamp at the time that the ReportSystemUsageRequest
is constructed.
Parameters | |
---|---|
usageTimestampMillis |
Long: Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z. |
Return | |
---|---|
ReportSystemUsageRequest.Builder |
This value cannot be null . |