App Center Push

Contents

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

https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-push

Stuck on a Cordova issue?

Installation

Community Enterprise
ionic cordova plugin add cordova-plugin-appcenter-push npm install @ionic-native/app-center-push
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More   or   Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/app-center-push

Supported Platforms

  • Android
  • iOS

Usage

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


constructor(private appCenterPush: AppCenterPush) { }

...

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