Ionic push notifications with phonegap doesn't work


#1

Hello,

I use ionic push puging with phonegap-plugin-push to get push notification from firebase using cloud functions.

It worked well but since 1 week, it seems to be broken.

My code :

let options: PushOptions = {
      android: {
        senderID: 'mySenderId',
        sound: 'true',
        vibrate: 'true',
        topics: ['topic']
      },
      ios: {
        alert: 'true',
        badge: true,
        sound: 'false',
        topics: ['topic']
      },
      windows: {}
    };

    this._pushObject = this.push.init(options);

    this._pushObject.on('notification').subscribe((notification: any) => {
      if (notification.additionalData.foreground) {
        alert(JSON.stringify(notification));
      }
    });

    this._pushObject.on('registration').subscribe((registration: any) => {
      console.log('registration ok', registration);
    });

    this._pushObject.on('error').subscribe(error => alert('Error with Push plugin' + error));

It never enter inside ‘registration’ subscribe and ‘notification’ subscribe (all console.log / alert arent showed).

I already update plugins but nothing work.

Can you help me ?

Thanks you