SQLite database engine implements a small, fast, self-contained, high-reliability, full-featured, . SQLite is one the most used database engine and is a C-language library. It is built into all mobile phones and most computers.
The main package is android.database.sqlite that contains the classes to manage your own databases
SQLiteDatabase mydatabase = openOrCreateDatabase("What is Database Name",MODE_PRIVATE,null);
By the steps to see the data stored in the SQLite database in the device. During developing the application we provide the pre-populated database. Also can make the database at runtime.
Some Usage Method & Description
openDatabase(String path, SQLiteDatabase.CursorFactory factory, int flags, DatabaseErrorHandler errorHandler)
In this method can opens the existing database with the appropriate flag mode.
openDatabase(String path, SQLiteDatabase.CursorFactory factory, int flags)
The method is also opens the existing database but it does not define any handler to handle the errors of databases
openOrCreateDatabase(String path, SQLiteDatabase.CursorFactory factory)
It not only opens but create the database if it not exists. Therefore the method is equivalent to openDatabase method.
openOrCreateDatabase(File file, SQLiteDatabase.CursorFactory factory)
This method is similar to above method but it takes the File object as a path rather then a string. It is equivalent to file.getPath().
This time we solve a error message as
Can’t view SQLite database on device in (Android Device Monitor) in Android studio.
- After create database(db.) need to check go to android device anager then searchh your application package name there.
- Next select file explorer and click on data if it’s not exist restart your emulator with API’s below 23.
- As API’s above 23 does not allow access to android device manager.
If you do not the article follow the video tutorial and subscribe us on YouTube. Thank you.
see more solution with android related and development
- How to download and install android studio 3.1.4 latest (2018)
- Android Studio : Application won’t run unless you update google play services
- Android Studio: Use Navigation Drawer with Tabs
- Navigation Drawer and its Usage in Android.
- Required import android.support.v4.app.Fragment; in Android Studio
- How to Add Roboto Font on Your Android Project