Hi All,
I’m a novice, but I have a problem with my SQL3Lite pre-populated DB and IONIC5, with Capacitor.
I put my database.db file into Ionic project, into folder SRC/ASSETS (not into www folder because framework cleans and refreshes it at every compile or sync phase).
After a cap sync, that file appears into the android project folder:
…android\app\src\main\assets\public\assets
But in run-time, when I use method this.sqliteDbCopy.copy( ‘database.db’, 0) in my Angular service, I catch only a message with code 400 and text with: message:www/database.db.
I suppose that the copy funtion doesn’t find the database file or the folder www or the correct path.
The copy function creates only a new empty database.db files in the correct database folder destination.
I tried to move the original database.db file in everywhere, among Android folders, but nothing.
Would you try to help me?
The copy is from import { SqliteDbCopy } from ‘@ionic-native/sqlite-db-copy/ngx’;
Thanks.
Marco
1 post - 1 participant