DatabaseProvider, AutoCloseablepublic final class ExoDatabaseProvider extends SQLiteOpenHelper implements DatabaseProvider
SQLiteOpenHelper that provides instances of a standalone ExoPlayer database.
Suitable for use by applications that do not already have their own database, or that would
prefer to keep ExoPlayer tables isolated in their own database. Other applications should prefer
to use DefaultDatabaseProvider with their own SQLiteOpenHelper.
| Modifier and Type | Field | Description |
|---|---|---|
static String |
DATABASE_NAME |
The file name used for the standalone ExoPlayer database.
|
TABLE_PREFIX| Constructor | Description |
|---|---|
ExoDatabaseProvider(Context context) |
Provides instances of the database located by passing
DATABASE_NAME to Context.getDatabasePath(String). |
| Modifier and Type | Method | Description |
|---|---|---|
void |
onCreate(SQLiteDatabase db) |
|
void |
onDowngrade(SQLiteDatabase db,
int oldVersion,
int newVersion) |
|
void |
onUpgrade(SQLiteDatabase db,
int oldVersion,
int newVersion) |
getReadableDatabase, getWritableDatabaseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getDatabaseName, getReadableDatabase, getWritableDatabase, onConfigure, onOpen, setIdleConnectionTimeout, setLookasideConfig, setOpenParams, setWriteAheadLoggingEnabledpublic static final String DATABASE_NAME
public ExoDatabaseProvider(Context context)
DATABASE_NAME to Context.getDatabasePath(String).context - Any context.public void onCreate(SQLiteDatabase db)
onCreate in class SQLiteOpenHelperpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
onUpgrade in class SQLiteOpenHelperpublic void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion)
onDowngrade in class SQLiteOpenHelper