Hello,
I wanted to know if PWA generated app can use the File Transfer Plugin. I tried following the file transfer plugin sample app but nothing is downloaded, I also tried set up in the OnReady for the FilePath but I get error message "Cordova not defined".
Hi Wenchester,
You can do it by using FileSave js. Here you have a sample on how to download a file in a PWA. Let me know if it works for you.
Thanks!
hihow i can use this .oap file in outsystem please ?
How are you accessing your PWA? Most Cordova plugins will only work on mobile devices.
Hi Jeroen,
I install it in my android phone through browser "Add to Home"
Hi Wenchester
Because File Transfer Plugin supports browser, So I think it will work on PWA.
Can you upload oml file? So we can take a look for more details.
Best Regards
You can inspect the codeof the FileTransfer Plugin by opening the module in service studio. What you will see is that it uses a Cordova github project and that on every download/upload action it checks for the existence of the cordova plugin and cordova.
As a PWA does not run in a cordova shell, but directly in the browser, I believe the plugin cannot be used when installed as a PWA. You can test this out by installing the accompanying demo application as a PWA on your mobile device. You will notice an error message is shown "Cordova is not defined".
Regards,
Daniel
So if I want to distribute my apps as a PWA and want to have a download feature in my mobile apps, how to do so?
Thank you @Experts for the sample above! It really helped me.
My goal was to export all data from the database in a PWA, I've attached a sample in case anyone else is trying to do the same thing.