MV Help with my save export/import plugin on android

When the game is exported to Android, my plugin just doesn't work at all. When the command is activated, nothing happens. I don't know, maybe there is a problem with the permissions, maybe the maker just doesn't digest the "click", I don't know. Help, who knows what to do with it

here's the plugin I used as a base:


also I am using jsZIP library


Code:
(function($, undefined) {
    "use strict";
    $.SAVE = {

        export: function() {

            const zip = new JSZip();
                    for (let i = 1; i < 70; i++) {
                        var info = DataManager.loadSavefileInfo(i),
                            data = StorageManager.load(i);
            
                        if (info || data) {
                            var filename = `saveFile${i}.json`;                           
                          
                            var encoded = LZString.compressToBase64(JsonEx.stringify({ info: info, data: data }));
                            zip.file(filename, encoded);
                        }
                    }
                            
                        zip.generateAsync({type:"blob"}).then(function(encoded) {
                            var elementd = document.createElement('a');
                            elementd.href = URL.createObjectURL(encoded);
                            elementd.setAttribute('download', "save.zip");
                            if (document.createEvent) {
                                var event = document.createEvent('MouseEvents');
                                event.initEvent('click', true, true);
                                elementd.dispatchEvent(event);
                            } else { elementd.click(); }   
                        });
      
                },

                import: function() {
                    var input = document.createElement('input');
                     input.type = 'file';
                     input.accept = '.zip';
                     input.style.display = 'none';
                
                     input.onchange = function(e) {
                         var file = e.target.files[0];
                        
                         if (!file.name.endsWith('.zip')) {
                             window.alert('Invalid file type. Please select a .zip file.');
                             return;
                         }
                
                         var reader = new FileReader();
                         reader.onload = function(event) {
                            
                             var zip = new JSZip();
                             var fs = require("fs");
                             fs.readFile(file.path, function(err, data) {
                                
                                 zip.loadAsync(data).then(function(zipContent) {
                                 var globalInfo = DataManager.loadGlobalInfo();
                                 var promises = [];
                                 for (let i = 1; i <= 70; i++) {
                                     let fileName = `saveFile${i}.json`;
                                    
                                     if (zipContent.file(fileName)) {
                                         promises.push(
                                             zipContent.file(fileName).async('string').then(function(fileContent) {
                                                
                                                 const data = JsonEx.parse(LZString.decompressFromBase64(fileContent));
                                                     globalInfo[i] = data.info;
                                                     DataManager.saveGlobalInfo(globalInfo);
                                                     StorageManager.save(i, data.data);
                                                
                                             })
                                         );
                                     }
                                 }
                
                                 Promise.all(promises).then(function() {
                                     window.alert('Import successful for all valid save files. Please restart the game for changes to take effect.');
                                 }).catch(function(error) {
                                     window.alert('An error occurred while importing: ' + error.message);
                                 });
                             }).catch(function(error) {                       
                                 console.log(error);
                             });});
                            
                         };
                        
                         reader.readAsArrayBuffer(file);
                     };
                    
                     document.body.appendChild(input);
                     input.click();
                     document.body.removeChild(input);
                
                     }
    };


    
    

})(this.sythG || (this.sythG = {}));
I solved the problem, it just needed to add some java functions
This thread is closed due to being indicated as solved. Report the next one so we can find it easily. If you need this thread reopened, report it to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/help-with-my-save-export-import-plugin-on-android.175405/