# FirebaseAIOnDevice


```
object FirebaseAIOnDevice
```

<br />

*** ** * ** ***

Entry point for Firebase AI On-Device functionality.

*Note:* This class **does not** provides any inference-related functionality for the on-device AI model.

## Summary

| ### Public functions |
|---|---|
| `suspend https://firebase.google.com/docs/reference/kotlin/com/google/firebase/ai/ondevice/OnDeviceModelStatus` | `[checkStatus](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/ai/ondevice/FirebaseAIOnDevice#checkStatus())()` **This function is deprecated.** Use \`GenerativeModel.OnDeviceExtension\` from \`firebase-ai\` instead |
| `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<https://firebase.google.com/docs/reference/kotlin/com/google/firebase/ai/ondevice/DownloadStatus>` | `[download](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/ai/ondevice/FirebaseAIOnDevice#download())()` **This function is deprecated.** Use \`GenerativeModel.OnDeviceExtension\` from \`firebase-ai\` instead |

## Public functions

### checkStatus

```
suspend fun [checkStatus](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/ai/ondevice/FirebaseAIOnDevice#checkStatus())(): OnDeviceModelStatus
```

> [!CAUTION]
> **This function is deprecated.**   
> Use \`GenerativeModel.OnDeviceExtension\` from \`firebase-ai\` instead

Checks the current status / availability of the on-device AI model.

| Returns |
|---|---|
| `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/ai/ondevice/OnDeviceModelStatus` | An `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/ai/ondevice/OnDeviceModelStatus` object indicating the current state of the model. |

### download

```
fun [download](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/ai/ondevice/FirebaseAIOnDevice#download())(): Flow<DownloadStatus>
```

> [!CAUTION]
> **This function is deprecated.**   
> Use \`GenerativeModel.OnDeviceExtension\` from \`firebase-ai\` instead

Initiates the download of the on-device AI model.

This method returns a `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html` that emits `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/ai/ondevice/DownloadStatus` updates as the download progresses. Consumers should collect the flow to start the download process, and optionally process any updates on the download state, progress, and completion or failure.

| Returns |
|---|---|
| `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<https://firebase.google.com/docs/reference/kotlin/com/google/firebase/ai/ondevice/DownloadStatus>` | A `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html` of `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/ai/ondevice/DownloadStatus` objects representing the download lifecycle. |