# PlayServicesStorage

Artifact: [androidx.appsearch:appsearch-play-services-storage](https://developer.android.com/jetpack/androidx/releases/appsearch) [View Source](https://cs.android.com/search?q=file:androidx/appsearch/playservicesstorage/PlayServicesStorage.java+class:androidx.appsearch.playservicesstorage.PlayServicesStorage) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

*** ** * ** ***

<br />

```
class PlayServicesStorage
```

<br />

*** ** * ** ***

An AppSearch storage system which stores data in the central AppSearch service in Google Play Services.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage.GlobalSearchContext` Contains information relevant to creating a global search session. |
| `class https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage.GlobalSearchContext.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage.GlobalSearchContext` objects. |
| `class https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage.SearchContext` Contains information about how to create the search session. |
| `class https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage.SearchContext.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage.SearchContext` objects. |

| ### Public functions |
|---|---|
| `java-static https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/kotlin/androidx/appsearch/app/GlobalSearchSession!>` | `https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage#createGlobalSearchSessionAsync(androidx.appsearch.playservicesstorage.PlayServicesStorage.GlobalSearchContext)( context: https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage.GlobalSearchContext )` Opens a new `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GlobalSearchSession` on this storage. |
| `java-static https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSession!>` | `https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage#createSearchSessionAsync(androidx.appsearch.playservicesstorage.PlayServicesStorage.SearchContext)(context: https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage.SearchContext)` Opens a new `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSession` on this storage. |

## Public functions

### createGlobalSearchSessionAsync

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

```
java-static fun createGlobalSearchSessionAsync(
    context: PlayServicesStorage.GlobalSearchContext
): ListenableFuture<GlobalSearchSession!>
```

Opens a new `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GlobalSearchSession` on this storage.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage.GlobalSearchContext` | The `https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage.GlobalSearchContext` contains all information to create a new `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GlobalSearchSession` |

### createSearchSessionAsync

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

```
java-static fun createSearchSessionAsync(context: PlayServicesStorage.SearchContext): ListenableFuture<AppSearchSession!>
```

Opens a new `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSession` on this storage.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage.SearchContext` | The `https://developer.android.com/reference/kotlin/androidx/appsearch/playservicesstorage/PlayServicesStorage.SearchContext` contains all information to create a new `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSession` |