RoomDatabase.PrepackagedDatabaseCallback


public abstract class RoomDatabase.PrepackagedDatabaseCallback


Callback for Builder.createFromAsset, Builder.createFromFile and Builder.createFromInputStream

This callback will be invoked after the pre-package DB is copied but before Room had a chance to open it and therefore before the RoomDatabase.Callback methods are invoked. This callback can be useful for updating the pre-package DB schema to satisfy Room's schema validation.

Summary

Public constructors

Public methods

abstract void

Called when the pre-packaged database has been copied.

Public constructors

PrepackagedDatabaseCallback

Added in 3.0.0-alpha01
public PrepackagedDatabaseCallback()

Public methods

onOpenPrepackagedDatabase

Added in 3.0.0-alpha01
public abstract void onOpenPrepackagedDatabase(@NonNull SQLiteConnection connection)

Called when the pre-packaged database has been copied.

Parameters
@NonNull SQLiteConnection connection

The database connection.