App Center Push

Contents

For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/push/cordova

Ionic 消息推送插件App Center Push插件的安装(Installation)

ionic cordova plugin add cordova-plugin-appcenter-push npm install @ionic-native/app-center-push

Ionic 消息推送插件App Center Push插件支持的平台(Supported Platforms)

  • Android
  • iOS

Ionic 消息推送插件App Center Push插件的用法(Usage)

import { AppCenterPush } from '@ionic-native/app-center-push';


constructor(private appCenterPush: AppCenterPush) { }

...

this.appCenterPush.setEnabled(true).then(() => {
   this.appCenterPush.addEventListener('My Event').subscribe(pushNotification => {
       console.log('Recived push notification', pushNotification);
   });
});