Class StandaloneDatabaseProvider
- java.lang.Object
-
- android.database.sqlite.SQLiteOpenHelper
-
- com.google.android.exoplayer2.database.StandaloneDatabaseProvider
-
- All Implemented Interfaces:
DatabaseProvider,AutoCloseable
- Direct Known Subclasses:
ExoDatabaseProvider
@Deprecated public class StandaloneDatabaseProvider extends SQLiteOpenHelper implements DatabaseProvider
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.AnSQLiteOpenHelperthat 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
DefaultDatabaseProviderwith their ownSQLiteOpenHelper.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDATABASE_NAMEDeprecated.The file name used for the standalone database.-
Fields inherited from interface com.google.android.exoplayer2.database.DatabaseProvider
TABLE_PREFIX
-
-
Constructor Summary
Constructors Constructor Description StandaloneDatabaseProvider(Context context)Deprecated.Provides instances of the database located by passingDATABASE_NAMEtoContext.getDatabasePath(String).
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidonCreate(SQLiteDatabase db)Deprecated.voidonDowngrade(SQLiteDatabase db, int oldVersion, int newVersion)Deprecated.voidonUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)Deprecated.-
Methods inherited from class android.database.sqlite.SQLiteOpenHelper
close, getDatabaseName, getReadableDatabase, getWritableDatabase, onConfigure, onOpen, setIdleConnectionTimeout, setLookasideConfig, setOpenParams, setWriteAheadLoggingEnabled
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.android.exoplayer2.database.DatabaseProvider
getReadableDatabase, getWritableDatabase
-
-
-
-
Field Detail
-
DATABASE_NAME
public static final String DATABASE_NAME
Deprecated.The file name used for the standalone database.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StandaloneDatabaseProvider
public StandaloneDatabaseProvider(Context context)
Deprecated.Provides instances of the database located by passingDATABASE_NAMEtoContext.getDatabasePath(String).- Parameters:
context- Any context.
-
-
Method Detail
-
onCreate
public void onCreate(SQLiteDatabase db)
Deprecated.- Specified by:
onCreatein classSQLiteOpenHelper
-
onUpgrade
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
Deprecated.- Specified by:
onUpgradein classSQLiteOpenHelper
-
onDowngrade
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion)
Deprecated.- Overrides:
onDowngradein classSQLiteOpenHelper
-
-