Closed rachitpant closed 4 years ago
@rachitpant any solutions here? have the same Problem
I ended up using cordova-plugin-file-transfer
plugin. Served me well.
i ended up with own implementation, but here the possible solution that i have found out:
i created downloader.js
and added some test code:
document.addEventListener(
"deviceready",
() => {
downloader.init({ folder: "folder" });
downloader.get("url" );
},
false
);
const events = [
"DOWNLOADER_downloadProgress",
"DOWNLOADER_initialized",
"DOWNLOADER_downloadSuccess",
"DOWNLOADER_downloadError"
];
for (const event of events) {
document.addEventListener(event, data => {
console.log(event);
console.log(data);
});
}
now you can import this script in any Vue component and this works
i ended up with own implementation, but here the possible solution that i have found out: i created
downloader.js
and added some test code:document.addEventListener( "deviceready", () => { downloader.init({ folder: "folder" }); downloader.get("url" ); }, false ); const events = [ "DOWNLOADER_downloadProgress", "DOWNLOADER_initialized", "DOWNLOADER_downloadSuccess", "DOWNLOADER_downloadError" ]; for (const event of events) { document.addEventListener(event, data => { console.log(event); console.log(data); }); }
now you can import this script in any Vue component and this works
is cordova plugin supports Vue when build or did you use quaser.
@WebScaffolder after 3 years, i don't know what this issue is about. But yes, I should have been using Quasar
I had added the plugin to a quasar project by going to src-cordova folder and running
cordova plugin addcordova-plugin-file-downloader
. All the cordova plugins have worked with just that in my quasar project. But here , even after adding , within any vue component , I getdownloader
is not defined. I also noticed the adding this plugin doesn't update the config.xml.