Monaca Onsen UI Discord Chat Github Repo

Changing text in the inAppUpdater prepare and download alert boxes.



  • Hi I am using the code below for the Monaca-in-App-Updater plugin:

    How can I change the the title and text in the two dialog boxes, “Preparing” & “Downloading”

    Thanks.

    function upDate() {
                            monaca.InAppUpdater.autoUpdate( {
                              connectDelay : 0000,
                              connectTimeout : 30000,
                              readTimeout: 300000,
                              nextTask : function(res) {
                                
                                if (res.requireRestart) {
                                  
                                  monaca.InAppUpdater.updateAndRestart().then(
                                    function(){ 
    
                                    },
                                    function(fail) { 
                                      alert(JSON.stringify(fail));
                                    },
                                    function( json ) {
    
                                      // alert( JSON.stringify(json));
                                      var s = json.count + "/" + json.total + " are done.";
                                      // console.log( s );
                                      document.getElementById("result").innerHTML = s;
                                    }
                                  );
                                } else {
                                  /* alert("アプリスタート"); */
                                }
                              },
                              failTask : function(res) {
                                monaca.InAppUpdater.showAlertDialog(
                                  { title : "Error Code "+res.error.code ,
                                    message : res.error.message ,
                                    button : { label : "OK" , handler : function() { } }
                                  } ).then(
                                  function(json) {  },
                                  function(fail) { }
                                );
                              }
                            });
    
                        }