# 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)

*** ** * ** ***


```
public final 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/androidx/appsearch/app/AppSearchSession#reportUsageAsync(androidx.appsearch.app.ReportUsageRequest)`.

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

## Summary

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

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/app/ReportSystemUsageRequest#getDatabaseName()()` Returns the database in which the document that was used resides. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/app/ReportSystemUsageRequest#getDocumentId()()` Returns the ID of document that was used. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/app/ReportSystemUsageRequest#getNamespace()()` Returns the namespace of the document that was used. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/app/ReportSystemUsageRequest#getPackageName()()` Returns the package name of the app which owns the document that was used. |
| `long` | `https://developer.android.com/reference/androidx/appsearch/app/ReportSystemUsageRequest#getUsageTimestampMillis()()` Returns the timestamp in milliseconds of the usage report (the time at which the document was used). |

## Public methods

### getDatabaseName

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

```
public @NonNull String getDatabaseName()
```

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)

```
public @NonNull String getDocumentId()
```

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)

```
public @NonNull String getNamespace()
```

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)

```
public @NonNull String getPackageName()
```

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)

```
public long getUsageTimestampMillis()
```

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.