# GlobalSearchApplicationInfo

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

*** ** * ** ***


```
@ExperimentalAppSearchApi
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.VERBATIM_SEARCH)
@Document(name = "builtin:GlobalSearchApplicationInfo")
public class GlobalSearchApplicationInfo
```

<br />

*** ** * ** ***

An indexable document class which indicates that an app is capable of producing, or capable of consuming, certain AppSearch schema types.

This class represents optional metadata about an app's data interchange, and is not part of the schema.org types that model object schemas.

A producer can check for the existence of ready consumers by querying for `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo` documents that ask for a type that producer produces. Once a matching `https://developer.android.com/reference/androidx/appsearch/app/SearchResult` is retrieved, the producer can set a schema with access permissions granted to the package that owns this `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo` and index documents of that type.

The package name of the app which is producing or consuming data is not part of this class -- it can be obtained from `https://developer.android.com/reference/androidx/appsearch/app/SearchResult#getPackageName()`.

## Summary

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

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#APPLICATION_TYPE_CONSUMER() = 1` Used with `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()` to indicate this application is able and interested in querying a certain type of data. |
| `static final int` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#APPLICATION_TYPE_PRODUCER() = 0` Used with `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()` to indicate this application is ready and able to index a certain type of data. |

| ### Public methods |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()()` Returns whether this app is interested in either producing or consuming the schema types listed in `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getSchemaTypes()`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getId()()` Returns the unique identifier for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getNamespace()()` Returns the namespace (or logical grouping) for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html>` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getSchemaTypes()()` Returns the list of schema type names this app is capable of producing (if `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()` is `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#APPLICATION_TYPE_PRODUCER()`) or interested in consuming (if `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()`). |

## Constants

### APPLICATION_TYPE_CONSUMER

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

```
public static final int APPLICATION_TYPE_CONSUMER = 1
```

Used with `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()` to indicate this application is able and interested in querying a certain type of data.

### APPLICATION_TYPE_PRODUCER

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

```
public static final int APPLICATION_TYPE_PRODUCER = 0
```

Used with `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()` to indicate this application is ready and able to index a certain type of data.

## Public methods

### getApplicationType

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

```
public int getApplicationType()
```

Returns whether this app is interested in either producing or consuming the schema types listed in `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getSchemaTypes()`.

### getId

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

```
public @NonNull String getId()
```

Returns the unique identifier for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo`.

### getNamespace

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

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

Returns the namespace (or logical grouping) for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo`.

### getSchemaTypes

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

```
public @NonNull List<@NonNull String> getSchemaTypes()
```

Returns the list of schema type names this app is capable of producing (if `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()` is `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#APPLICATION_TYPE_PRODUCER()`) or interested in consuming (if `https://developer.android.com/reference/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()`).