I’d rather check the existence of the file directly:
private static boolean doesDatabaseExist(Context context, String dbName) {
File dbFile = context.getDatabasePath(dbName);
return dbFile.exists();
}
More Related Contents:
- Android :: SQLIte Db don't insert the datas
- sample code for using mongoDB for storing user information and comments in an android application [closed]
- How can I avoid concurrency problems when using SQLite on Android?
- Android SQLite database: slow insertion
- Best way to work with dates in Android SQLite [closed]
- Android SQLite Example [closed]
- Android database encryption
- Import .csv file to Sqlite in Android
- How to sync SQLite database on Android phone with MySQL database on server?
- How to add new Column to Android SQLite Database?
- Android: Using SimpleCursorAdapter to get Data from Database to ListView
- copy database from assets to databases folder [duplicate]
- What is a Full Android Database Helper class for an existing SQLite database? [closed]
- How do I create a database in android? [closed]
- How to save images into Database
- Android SimpleCursorAdapter doesn’t update when database changes
- Android SQLite Database, WHY drop table and recreate on upgrade
- Best way to save large amount of data locally in unity3D android? [closed]
- How does one check if a table exists in an Android SQLite database?
- SQLite returned an error code of 14
- Drawable to byte[]
- Could not allocate CursorWindow
- SQLiteOpenHelper – creating database on SD card
- SQLite android column not found
- How to text filter an Android ListView backed by a SimpleCursorAdapter?
- How to view SQL database in Eclipse Debug mode for android
- H2 Database vs SQLite on Android [closed]
- How to update the Android media database
- SQLiteOpenHelper onUpgrade() Confusion Android
- Using COLLATE in Android SQLite – Locales is ignored in LIKE statement