How to use @ionic-native/code-push - 10 common examples

To help you get started, we’ve selected a few @ionic-native/code-push examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mzl1988 / LlgApp / src / providers / NativeService.ts View on Github external
// why ??

                // forcing to run in the ngzone
                this.ngZone.run(() => {
                    this.messageText = '应用程式是最新的!';
                });
            }

            // not facing zoning issue here ?

            switch (syncStatus) {
                case SyncStatus.IN_PROGRESS:
                    this.messageText = '正在进行更新 ..';
                    break;

                case SyncStatus.CHECKING_FOR_UPDATE:
                    this.messageText = '检查更新 ..';
                    break;

                case SyncStatus.DOWNLOADING_PACKAGE:
                    this.messageText = '下载包 ..';
                    break;

                case SyncStatus.INSTALLING_UPDATE:
                    this.messageText = '安装更新 ..';
                    break;

                case SyncStatus.UPDATE_INSTALLED:
                    this.messageText = '安装更新 ..';
                    const alert = this.alertCtrl.create({
                        title: '更新',
                        message: '安装了一个新的更新,并将在下次重新启动应用程序时可用',
github mzl1988 / LlgApp / src / providers / NativeService.ts View on Github external
// not facing zoning issue here ?

            switch (syncStatus) {
                case SyncStatus.IN_PROGRESS:
                    this.messageText = '正在进行更新 ..';
                    break;

                case SyncStatus.CHECKING_FOR_UPDATE:
                    this.messageText = '检查更新 ..';
                    break;

                case SyncStatus.DOWNLOADING_PACKAGE:
                    this.messageText = '下载包 ..';
                    break;

                case SyncStatus.INSTALLING_UPDATE:
                    this.messageText = '安装更新 ..';
                    break;

                case SyncStatus.UPDATE_INSTALLED:
                    this.messageText = '安装更新 ..';
                    const alert = this.alertCtrl.create({
                        title: '更新',
                        message: '安装了一个新的更新,并将在下次重新启动应用程序时可用',
                        buttons: ['好']
                    });
                    alert.present();
                    alert.onDidDismiss(() => {
                    });
                    break;

                case SyncStatus.ERROR:
github mzl1988 / LlgApp / src / providers / NativeService.ts View on Github external
}).subscribe((syncStatus) => {

            if (syncStatus === SyncStatus.UP_TO_DATE) {

                // facing some zoning problems here !!
                // why ??

                // forcing to run in the ngzone
                this.ngZone.run(() => {
                    this.messageText = '应用程式是最新的!';
                });
            }

            // not facing zoning issue here ?

            switch (syncStatus) {
                case SyncStatus.IN_PROGRESS:
                    this.messageText = '正在进行更新 ..';
                    break;
github mzl1988 / LlgApp / src / providers / NativeService.ts View on Github external
this.messageText = '应用程式是最新的!';
                });
            }

            // not facing zoning issue here ?

            switch (syncStatus) {
                case SyncStatus.IN_PROGRESS:
                    this.messageText = '正在进行更新 ..';
                    break;

                case SyncStatus.CHECKING_FOR_UPDATE:
                    this.messageText = '检查更新 ..';
                    break;

                case SyncStatus.DOWNLOADING_PACKAGE:
                    this.messageText = '下载包 ..';
                    break;

                case SyncStatus.INSTALLING_UPDATE:
                    this.messageText = '安装更新 ..';
                    break;

                case SyncStatus.UPDATE_INSTALLED:
                    this.messageText = '安装更新 ..';
                    const alert = this.alertCtrl.create({
                        title: '更新',
                        message: '安装了一个新的更新,并将在下次重新启动应用程序时可用',
                        buttons: ['好']
                    });
                    alert.present();
                    alert.onDidDismiss(() => {
github mzl1988 / LlgApp / src / providers / NativeService.ts View on Github external
if (syncStatus === SyncStatus.UP_TO_DATE) {

                // facing some zoning problems here !!
                // why ??

                // forcing to run in the ngzone
                this.ngZone.run(() => {
                    this.messageText = '应用程式是最新的!';
                });
            }

            // not facing zoning issue here ?

            switch (syncStatus) {
                case SyncStatus.IN_PROGRESS:
                    this.messageText = '正在进行更新 ..';
                    break;

                case SyncStatus.CHECKING_FOR_UPDATE:
                    this.messageText = '检查更新 ..';
                    break;

                case SyncStatus.DOWNLOADING_PACKAGE:
                    this.messageText = '下载包 ..';
                    break;

                case SyncStatus.INSTALLING_UPDATE:
                    this.messageText = '安装更新 ..';
                    break;

                case SyncStatus.UPDATE_INSTALLED:
github adrianonrails / baruch / src / providers / app-update-service.ts View on Github external
.subscribe((syncStatus) => {
        switch (syncStatus) {
          case SyncStatus.CHECKING_FOR_UPDATE:
            notificationObject.text = "Checking for updates..."
            this.localNotifications.schedule(notificationObject);
            break;
          case SyncStatus.INSTALLING_UPDATE:
            notificationObject.text = "Installing update...";
            notificationObject["progressBar"] = { value: 100 };
            this.localNotifications.update(notificationObject);
            break;
          case SyncStatus.UP_TO_DATE:
          case SyncStatus.ERROR:
          case SyncStatus.UPDATE_IGNORED:
          case SyncStatus.UPDATE_INSTALLED:
            this.localNotifications.cancel(notificationObject.id);
            break;
        }
      });
github mzl1988 / LlgApp / src / providers / NativeService.ts View on Github external
this.messageText = '安装更新 ..';
                    break;

                case SyncStatus.UPDATE_INSTALLED:
                    this.messageText = '安装更新 ..';
                    const alert = this.alertCtrl.create({
                        title: '更新',
                        message: '安装了一个新的更新,并将在下次重新启动应用程序时可用',
                        buttons: ['好']
                    });
                    alert.present();
                    alert.onDidDismiss(() => {
                    });
                    break;

                case SyncStatus.ERROR:
                    this.messageText = '发生错误 :( ...';
                    break;

                default:
                    this.messageText = '未处理的同步状态 ..';
                    break;
            }

        });
    }
github adrianonrails / baruch / src / providers / app-update-service.ts View on Github external
.subscribe((syncStatus) => {
        switch (syncStatus) {
          case SyncStatus.CHECKING_FOR_UPDATE:
            notificationObject.text = "Checking for updates..."
            this.localNotifications.schedule(notificationObject);
            break;
          case SyncStatus.INSTALLING_UPDATE:
            notificationObject.text = "Installing update...";
            notificationObject["progressBar"] = { value: 100 };
            this.localNotifications.update(notificationObject);
            break;
          case SyncStatus.UP_TO_DATE:
          case SyncStatus.ERROR:
          case SyncStatus.UPDATE_IGNORED:
          case SyncStatus.UPDATE_INSTALLED:
            this.localNotifications.cancel(notificationObject.id);
            break;
        }
      });
  }
github adrianonrails / baruch / src / providers / app-update-service.ts View on Github external
.subscribe((syncStatus) => {
        switch (syncStatus) {
          case SyncStatus.CHECKING_FOR_UPDATE:
            notificationObject.text = "Checking for updates..."
            this.localNotifications.schedule(notificationObject);
            break;
          case SyncStatus.INSTALLING_UPDATE:
            notificationObject.text = "Installing update...";
            notificationObject["progressBar"] = { value: 100 };
            this.localNotifications.update(notificationObject);
            break;
          case SyncStatus.UP_TO_DATE:
          case SyncStatus.ERROR:
          case SyncStatus.UPDATE_IGNORED:
          case SyncStatus.UPDATE_INSTALLED:
            this.localNotifications.cancel(notificationObject.id);
            break;
        }
      });
  }
github adrianonrails / baruch / src / providers / app-update-service.ts View on Github external
.subscribe((syncStatus) => {
        switch (syncStatus) {
          case SyncStatus.CHECKING_FOR_UPDATE:
            notificationObject.text = "Checking for updates..."
            this.localNotifications.schedule(notificationObject);
            break;
          case SyncStatus.INSTALLING_UPDATE:
            notificationObject.text = "Installing update...";
            notificationObject["progressBar"] = { value: 100 };
            this.localNotifications.update(notificationObject);
            break;
          case SyncStatus.UP_TO_DATE:
          case SyncStatus.ERROR:
          case SyncStatus.UPDATE_IGNORED:
          case SyncStatus.UPDATE_INSTALLED:
            this.localNotifications.cancel(notificationObject.id);
            break;
        }
      });
  }