# ReportSystemUsageRequest

Artifact: [androidx.appsearch:appsearch](https://developer.android.com/jetpack/androidx/releases/appsearch) [View Source](https://cs.android.com/search?q=file:androidx/appsearch/app/ReportSystemUsageRequest.java+class:androidx.appsearch.app.ReportSystemUsageRequest) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

*** ** * ** ***


```
class ReportSystemUsageRequest
```

<br />

*** ** * ** ***

A request to report usage of a document owned by another app from a system UI surface.

Usage reported in this way is measured separately from usage reported via `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSession#reportUsageAsync(androidx.appsearch.app.ReportUsageRequest)`.

See `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GlobalSearchSession#reportSystemUsageAsync(androidx.appsearch.app.ReportSystemUsageRequest)` for a detailed description of usage reporting.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/appsearch/app/ReportSystemUsageRequest.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/appsearch/app/ReportSystemUsageRequest` objects. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/ReportSystemUsageRequest#getDatabaseName()()` Returns the database in which the document that was used resides. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/ReportSystemUsageRequest#getDocumentId()()` Returns the ID of document that was used. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/ReportSystemUsageRequest#getNamespace()()` Returns the namespace of the document that was used. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/ReportSystemUsageRequest#getPackageName()()` Returns the package name of the app which owns the document that was used. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/ReportSystemUsageRequest#getUsageTimestampMillis()()` Returns the timestamp in milliseconds of the usage report (the time at which the document was used). |

## Public functions

### getDatabaseName

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun getDatabaseName(): String
```

Returns the database in which the document that was used resides.

### getDocumentId

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun getDocumentId(): String
```

Returns the ID of document that was used.

### getNamespace

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun getNamespace(): String
```

Returns the namespace of the document that was used.

### getPackageName

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun getPackageName(): String
```

Returns the package name of the app which owns the document that was used.

### getUsageTimestampMillis

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
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 `https://developer.android.com/reference/java/lang/System.html#currentTimeMillis()` time base.