Page 1 of 1

Make a backup in File Documents under Android

Posted: Mon Apr 28, 2025 2:22 pm
by Trebor55
Hello
I would like to know if with JavaScript it is possible to make a backup in the Documents file under Android
Thanks

Re: Make a backup in File Documents under Android

Posted: Tue Apr 29, 2025 7:49 am
by Dirk Geppert
Unfortunately, this is not possible with pure Javascript due to browser security restrictions.

However, you can offer files to the user for download and the user can then store them in Documents.

If you are building your project as a hybrid app, it could possibly work via Cordova plugins.

Code: Select all

cordova-plugin-file
cordova-plugin-android-permissions
I only researched this briefly because I was also interested. Unfortunately, I don't know any more about it (yet).

Re: Make a backup in File Documents under Android

Posted: Tue Apr 29, 2025 10:18 am
by Caronte3D
From JavaScript you can save in the app folder of your Android device (the one like: com.xxxxxxx.yyyyy) so... your user can find the saved files using a filebrowser app.