# FirebaseAIOnDevice


```
public static class 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 fields |
|---|---|
| `static @https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html https://firebase.google.com/docs/reference/android/com/google/firebase/ai/ondevice/FirebaseAIOnDevice` | `https://firebase.google.com/docs/reference/android/com/google/firebase/ai/ondevice/FirebaseAIOnDevice#INSTANCE()` |

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html https://firebase.google.com/docs/reference/android/com/google/firebase/ai/ondevice/OnDeviceModelStatus` | `[checkStatus](https://firebase.google.com/docs/reference/android/com/google/firebase/ai/ondevice/FirebaseAIOnDevice#checkStatus())()` **This method is deprecated.** Use \`GenerativeModel.OnDeviceExtension\` from \`firebase-ai\` instead |
| `static final @https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<@https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html https://firebase.google.com/docs/reference/android/com/google/firebase/ai/ondevice/DownloadStatus>` | `[download](https://firebase.google.com/docs/reference/android/com/google/firebase/ai/ondevice/FirebaseAIOnDevice#download())()` **This method is deprecated.** Use \`GenerativeModel.OnDeviceExtension\` from \`firebase-ai\` instead |

## Public fields

### INSTANCE

```
public static @NonNull FirebaseAIOnDevice INSTANCE
```

## Public methods

### checkStatus

```
public static final @NonNull OnDeviceModelStatus [checkStatus](https://firebase.google.com/docs/reference/android/com/google/firebase/ai/ondevice/FirebaseAIOnDevice#checkStatus())()
```

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

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

| Returns |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html https://firebase.google.com/docs/reference/android/com/google/firebase/ai/ondevice/OnDeviceModelStatus` | An `https://firebase.google.com/docs/reference/android/com/google/firebase/ai/ondevice/OnDeviceModelStatus` object indicating the current state of the model. |

### download

```
public static final @NonNull Flow<@NonNull DownloadStatus> [download](https://firebase.google.com/docs/reference/android/com/google/firebase/ai/ondevice/FirebaseAIOnDevice#download())()
```

> [!CAUTION]
> **This method 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/android/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://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<@https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html https://firebase.google.com/docs/reference/android/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/android/com/google/firebase/ai/ondevice/DownloadStatus` objects representing the download lifecycle. |