What means location:'default' SQLite and Ionic pre-populated database

1.8k views Asked by At
import { Component } from '@angular/core';
import { NavController, Platform } from 'ionic-angular';
import { SQLite, SQLiteObject } from '@ionic-native/sqlite';

...

constructor(public navCtrl: NavController,
    private sqlite: SQLite,
    private platform: Platform) {

}

... 

this.sqlite.create({
        name: 'ionicdb.db',
        location: 'default'
})
.... 

I don't want to create new database, I have a database and I want to open it

where is stored the database in the ionic application, what mean: 'default', if I want to put the database in some other place, what do I do.

Where is stored the database on the Android device

In location:' ' I can to put the path, where is the pre-populated database

1

There are 1 answers

1
Shailesh Bhat On

/data/data/application_package_name/databases/database_file_name

If you open the project through Android Studio, you will find the database in above path..