StandaloneDatabaseProvider


@UnstableApi
public class StandaloneDatabaseProvider extends SQLiteOpenHelper implements DatabaseProvider

Known direct subclasses
ExoDatabaseProvider

This class is deprecated.

Use StandaloneDatabaseProvider.


An SQLiteOpenHelper that provides instances of a standalone database.

Suitable for use by applications that do not already have their own database, or that would prefer to keep tables used by media library components isolated in their own database. Other applications should prefer to use DefaultDatabaseProvider with their own .

Summary

Constants

static final String
DATABASE_NAME = "exoplayer_internal.db"

The file name used for the standalone database.

Public constructors

Provides instances of the database located by passing DATABASE_NAME to getDatabasePath.

Public methods

void
void
onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion)
void
onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)

Inherited Constants

From androidx.media3.database.DatabaseProvider
static final String
TABLE_PREFIX = "ExoPlayer"

Prefix for tables that can be read and written by media library components.

Inherited methods

From androidx.media3.database.DatabaseProvider
abstract SQLiteDatabase

Creates and/or opens a database.

abstract SQLiteDatabase

Creates and/or opens a database that will be used for reading and writing.

From android.database.sqlite.SQLiteOpenHelper
synchronized void
String
SQLiteDatabase
SQLiteDatabase
void
void
void
setIdleConnectionTimeout(long idleConnectionTimeoutMs)

This method is deprecated.

void
setLookasideConfig(int slotSize, int slotCount)
void
void
setWriteAheadLoggingEnabled(boolean enabled)

Constants

DATABASE_NAME

public static final String DATABASE_NAME = "exoplayer_internal.db"

The file name used for the standalone database.

Public constructors

StandaloneDatabaseProvider

public StandaloneDatabaseProvider(Context context)

Provides instances of the database located by passing DATABASE_NAME to getDatabasePath.

Parameters
Context context

Any context.

Public methods

onCreate

public void onCreate(SQLiteDatabase db)

onDowngrade

public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion)

onUpgrade

public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)