Added in API level 31

ReportUsageRequest


class ReportUsageRequest : Parcelable

A request to report usage of a document.

See AppSearchSession.reportUsage for a detailed description of usage reporting.

Summary

Nested classes

Builder for ReportUsageRequest objects.

Inherited constants
Int CONTENTS_FILE_DESCRIPTOR

Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.

Int PARCELABLE_WRITE_RETURN_VALUE

Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point.

Public methods
String

Returns the ID of document that was used.

String

Returns the namespace of the document that was used.

Long

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

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Public methods

getDocumentId

Added in API level 31
fun getDocumentId(): String

Returns the ID of document that was used.

Return
String This value cannot be null.

getNamespace

Added in API level 31
fun getNamespace(): String

Returns the namespace of the document that was used.

Return
String This value cannot be null.

getUsageTimestampMillis

Added in API level 31
fun getUsageTimestampMillis(): Long

Returns 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.
Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z.

Return
Long Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z.

writeToParcel

Added in API level 35
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

static val CREATOR: Parcelable.Creator<ReportUsageRequest!>