I am using Room library to save data in database.i want to get database.
used this code
private void copyFile() {
try {
File s
Try out this code :
String backupDBPath = YourRoomDatabase.getDatabase(context).getOpenHelper().getWritableDatabase().getPath();
It will return the path of your database. Use this exact path to create the file where you want to copy it. It will definitely work as worked for me.
File backupDB = new File(backupDBPath);