1

I'm using ionic 2 and phonegap push plugin (https://github.com/phonegap/phonegap-plugin-push) to send notification to device

When app is open there is no problem , but when i close the app I do not receive any notification i send.

Is the problem with plugin or ionic ?

I am using the latest version of ionic

and my code to register the push notification :

      this.push.register().then((t: PushToken) => {
        return this.push.saveToken(t);
      }).then((t: PushToken) => {
        alert('Token saved:'+ t.token);
      });

      this.push.rx.notification()
      .subscribe((msg) => {
        alert('I received push: ' + msg);
      });

or maybe i have to add some code for that?

Midhun Darvin
  • 1,236
  • 14
  • 24
Parham Heidari
  • 316
  • 3
  • 14

1 Answers1

0

As you are not receiving notification on MI phone, you can try changing your priority. I found a page where they say, setting priority to '2' had it working.

https://github.com/phonegap/phonegap-plugin-push/issues/707

Biswas Khayargoli
  • 976
  • 1
  • 11
  • 29