These are chat archives for angular/angular-2-ionic-2

29th
Apr 2017
Bienvenue TCHOUA
@tchoua08
Apr 29 2017 06:09
hi guys
@UncertaintyP hi.I was trying to implement push with ionic native plugin. I am getting error. (Error: Push plugin not found! See logs.)
Franz Fabian Schmid
@Nexi89
Apr 29 2017 06:47
@tchoua08 Maybe this thread can help you: https://forum.ionicframework.com/t/69697
Bienvenue TCHOUA
@tchoua08
Apr 29 2017 06:50
@Nexi89 Thank you
Franz Fabian Schmid
@Nexi89
Apr 29 2017 06:55
@tchoua08 you are welcome. let us know if it works
Bienvenue TCHOUA
@tchoua08
Apr 29 2017 09:19
@Nexi89 i put the condition if (this.platform.is('cordova'))
@Nexi89 no error message but i do not receive notification yet
Bienvenue TCHOUA
@tchoua08
Apr 29 2017 09:30
@Nexi89 I have an ionic 2 application that communicates with firebase and I would like to receive notifications when there is a new record
Bienvenue TCHOUA
@tchoua08
Apr 29 2017 09:38
@Nexi89 i was trying to implement push with ionic native plugin
Bienvenue TCHOUA
@tchoua08
Apr 29 2017 10:19
@Nexi89 pls help me
Bienvenue TCHOUA
@tchoua08
Apr 29 2017 10:36
@Nexi89 @UncertaintyP do you have an idea ?
Bienvenue TCHOUA
@tchoua08
Apr 29 2017 10:51
platformReady() {
// Call any initial plugins when ready
this.platform.ready().then(() => {
this.splashScreen.hide();
        if (this.platform.is('cordova')) {
        // device only code
        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:any) => {

      let myParam = {
        title:msg.title,
        message:msg.text
      };
      this.events.publish('activity:created');
      this.events.publish('user:message',myParam);
      alert(msg.title + ': ' + msg.text);



          });
Here is my code
@Nexi89 @UncertaintyP I would like the user to be notified when his registration is validated
Bienvenue TCHOUA
@tchoua08
Apr 29 2017 14:07
Hello Everyone
Franz Fabian Schmid
@Nexi89
Apr 29 2017 18:45
@tchoua08 It seems like they have changed the api: http://ionicframework.com/docs/native/push/
Some month ago I did it the way you tried to do it. But I never used firebase before, so I don't know if you can connect it with the push service, sorry. The documentation from Firebase Notifications is only for native apps. But there is a cordova plugin for firebase. Maybe that works for you: http://ionicframework.com/docs/native/firebase/
Bienvenue TCHOUA
@tchoua08
Apr 29 2017 19:01
@Nexi89 I was inspired by http://ionicframework.com/docs/native/firebase/ .I'm still exploring it to find out how it works
@Nexi89 Thank you