Monaca Onsen UI Discord Chat Github Repo

Could not open the pre-populated database using cordova-sqlite-ext



  • I’m trying to make a sample CRUD using cordova-sqlite-ext on my Cordova project first, I install the plugin like this

    cordova plugin add cordova-sqlite-ext
    

    After that, I put my pre-populated database inside the www folder

    And I open the database like this

    document.addEventListener('deviceready', onDeviceReady, false);
    
    function onDeviceReady() {
        var db = window.sqlitePlugin.openDatabase({
            name: 'app.db',
            location: 'default',
            createFromLocation: 1
        })
    }
    

    Is there something that I did wrong?

    Anw, I was run the application in browser and my android device as well But it still the same