StandaloneDatabaseProvider


@UnstableApi
class StandaloneDatabaseProvider : SQLiteOpenHelper, 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

const 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 functions

Unit
Unit
onDowngrade(db: SQLiteDatabase!, oldVersion: Int, newVersion: Int)
Unit
onUpgrade(db: SQLiteDatabase!, oldVersion: Int, newVersion: Int)

Inherited Constants

From androidx.media3.database.DatabaseProvider
const String!
TABLE_PREFIX = "ExoPlayer"

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

Inherited functions

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

Constants

DATABASE_NAME

const val DATABASE_NAME = "exoplayer_internal.db": String!

The file name used for the standalone database.

Public constructors

StandaloneDatabaseProvider

StandaloneDatabaseProvider(context: Context!)

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

Parameters
context: Context!

Any context.

Public functions

onCreate

fun onCreate(db: SQLiteDatabase!): Unit

onDowngrade

fun onDowngrade(db: SQLiteDatabase!, oldVersion: Int, newVersion: Int): Unit

onUpgrade

fun onUpgrade(db: SQLiteDatabase!, oldVersion: Int, newVersion: Int): Unit