FirebaseAIOnDevice

public static class FirebaseAIOnDevice


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 @NonNull FirebaseAIOnDevice

Public methods

static final @NonNull OnDeviceModelStatus

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

static final @NonNull Flow<@NonNull DownloadStatus>

Initiates the download of the on-device AI model.

Public fields

INSTANCE

public static @NonNull FirebaseAIOnDevice INSTANCE

Public methods

checkStatus

public static final @NonNull OnDeviceModelStatus checkStatus()

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

Returns
@NonNull OnDeviceModelStatus

An OnDeviceModelStatus object indicating the current state of the model.

download

public static final @NonNull Flow<@NonNull DownloadStatusdownload()

Initiates the download of the on-device AI model.

This method returns a Flow that emits 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
@NonNull Flow<@NonNull DownloadStatus>

A Flow of DownloadStatus objects representing the download lifecycle.