# MobileApplication.BuilderBase

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/MobileApplication.java+class:androidx.appsearch.builtintypes.MobileApplication.BuilderBase) Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

*** ** * ** ***


```
@ExperimentalAppSearchApi
class MobileApplication.BuilderBase<T : MobileApplication.BuilderBase<T!>?> : Thing.BuilderBase<T!>
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.appsearch.builtintypes.Thing.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase)\<T!\> ||
|   | ↳ | [androidx.appsearch.builtintypes.MobileApplication.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.BuilderBase) |

Known direct subclasses [MobileApplication.Builder](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.Builder)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.Builder` | Builder class for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication`. |

*** ** * ** ***

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.BuilderBase#BuilderBase(androidx.appsearch.builtintypes.MobileApplication)(mobileApplication: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication)` Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.BuilderBase` with all the existing values of a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication`. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.BuilderBase#BuilderBase(java.lang.String,java.lang.String,java.lang.String,byte[])( namespace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, packageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, sha256Certificate: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html> )` Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.BuilderBase`. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.BuilderBase#build()()` Builds the `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication`. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.BuilderBase#setClassName(java.lang.String)(className: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Sets the class name. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.BuilderBase#setDisplayName(java.lang.String)(displayName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Sets the display name. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.BuilderBase#setIconUri(android.net.Uri)(iconUri: https://developer.android.com/reference/android/net/Uri.html)` Sets the icon uri. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.BuilderBase#setUpdatedTimestampMillis(long)(updatedTimestampMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the last time the app was installed or updated on the device. |

### Inherited functions

From [androidx.appsearch.builtintypes.Thing.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase) `T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#addAlternateName(java.lang.String)(alternateName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`

Adds an alias for the item.
`T` `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#addPotentialAction(androidx.appsearch.builtintypes.PotentialAction)(newPotentialAction: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/PotentialAction)`

Add a new action to the list of potential actions for this document.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#clearAlternateNames()()`

Clears the aliases, if any, for the item.
`T` `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#clearPotentialActions()()`

Clear all the potential actions for this document.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#resetIfBuilt()()`

If built, make a copy of previous data for every field so that the builder can be reused.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setAlternateNames(java.util.List<java.lang.String>)(alternateNames: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>?)`

Sets a list of aliases for the item.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setCreationTimestampMillis(long)(creationTimestampMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Sets the creation timestamp for the current AppSearch entity, in milliseconds using the `https://developer.android.com/reference/java/lang/System.html#currentTimeMillis()` time base.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setDescription(java.lang.String)(description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the description for the item.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setDocumentScore(int)(documentScore: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Sets the user-provided opaque document score of the current AppSearch document, which can be used for ranking using `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchSpec#RANKING_STRATEGY_DOCUMENT_SCORE()`.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setDocumentTtlMillis(long)(documentTtlMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Sets the time-to-live (TTL) for the current AppSearch document as a duration in milliseconds.
`T` `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setImage(java.lang.String)(image: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the URL for an image of the item.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setName(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the name of the item.
`T` `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setPotentialActions(java.util.List<androidx.appsearch.builtintypes.PotentialAction>)(
newPotentialActions: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/PotentialAction!>?
)`

Sets a list of potential actions for this document.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setUrl(java.lang.String)(url: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the deeplink URL of the item.

## Public constructors

### BuilderBase

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

```
BuilderBase(mobileApplication: MobileApplication)
```

Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.BuilderBase` with all the existing values of a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication`.

| Parameters |
|---|---|
| `mobileApplication: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication` | The existing `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication` to copy values from. |

### BuilderBase

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

```
BuilderBase(
    namespace: String,
    id: String,
    packageName: String,
    sha256Certificate: ByteArray<Byte>
)
```

Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication.BuilderBase`.

| Parameters |
|---|---|
| `namespace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The namespace of the document. |
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The id of the document. |
| `packageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The package name of the application. |
| `sha256Certificate: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>` | The SHA-256 certificate of the application. |

## Public functions

### build

```
fun build(): MobileApplication
```

Builds the `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication`.

### setClassName

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

```
fun setClassName(className: String): T
```

Sets the class name.

### setDisplayName

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

```
fun setDisplayName(displayName: String): T
```

Sets the display name.

### setIconUri

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

```
fun setIconUri(iconUri: Uri): T
```

Sets the icon uri.

### setUpdatedTimestampMillis

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

```
fun setUpdatedTimestampMillis(updatedTimestampMillis: Long): T
```

Sets the last time the app was installed or updated on the device.