I am using Room API to implement a DB in my Android app. It seems that every time I load my app it tries to create the database again and again. Is there any way to restrict
You are using db that is, in fact, a file. You can check, if it exists, this method could be helpful:
private static boolean doesDatabaseExist(Context context, String dbName) { File dbFile = context.getDatabasePath(dbName); return dbFile.exists(); }