Skip to content

Instantly share code, notes, and snippets.

View Menris's full-sized avatar
🎯
Focusing

Amir Dautov Menris

🎯
Focusing
  • Almaty, Kazakhstan
View GitHub Profile
Room.databaseBuilder(context, AppDatabase.class,
DB_NAME)
.allowMainThreadQueries()
.fallbackToDestructiveMigration()
.addCallback(new RoomDatabase.Callback() {
@Override
public void onCreate(@NonNull SupportSQLiteDatabase db) {
super.onCreate(db);
Executors.newSingleThreadExecutor().execute(() -> {
//заполнение базы