public abstract class

RoomDatabase.PrepackagedDatabaseCallback

extends java.lang.Object

 java.lang.Object

↳androidx.room.RoomDatabase.PrepackagedDatabaseCallback

Overview

Callback for RoomDatabase.Builder.createFromAsset(String), RoomDatabase.Builder.createFromFile(File) and RoomDatabase.Builder.createFromInputStream(Callable)

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

Constructors
publicPrepackagedDatabaseCallback()

Methods
public voidonOpenPrepackagedDatabase(SupportSQLiteDatabase db)

Called when the pre-packaged database has been copied.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public PrepackagedDatabaseCallback()

Methods

public void onOpenPrepackagedDatabase(SupportSQLiteDatabase db)

Called when the pre-packaged database has been copied.

Parameters:

db: The database.