[CodePush] Show Loading with message that app is being updated?


#1

So I’ve implemented CodePush inside my app and it works and progress can be visible inside Dev Console. But I also want to show that Busy/Loading indicator that application is being update, which I cannot accomplish.

As you can see in my code, I’m passing options object for updateDialog, but that dialog is not shown and I dont get no errors within console.log.

Did I miss something??? Also can I somehow, during the update show my own Loading component??

CodePush.sync().subscribe((syncStatus) => console.log(syncStatus));

const downloadProgress = (progress) => { console.log(`Downloaded ${progress.receivedBytes} of ${progress.totalBytes}`); }
          CodePush.sync({
            updateDialog: {
              updateTitle: "Updating",
              mandatoryUpdateMessage: "Updating application...",
              optionalUpdateMessage: "Updating application..."
            }
          }, downloadProgress).subscribe((syncStatus) => console.log(syncStatus));

#2

I already impleted Toast like as example here

const downloadProgress = (progress) => {
  let toast = this.toastCtrl.create({
    message:  `Downloaded ${progress.receivedBytes} of ${progress.totalBytes}`,
    duration: 500,
    position: 'bottom'
  });
  toast.present();
};