How to access an existing sqlite database in Android?

Take a look at the documentation for android.database.sqlite.SQLiteDatabase.

In particular, there’s an openDatabase() command that will access a database given a file path.

SQLiteDatabase db = SQLiteDatabase.openDatabase(path, null, 0);

Just specify the path to your database as the path variable, and it should work.

Leave a Comment