Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49227

Problem with OneSignal

$
0
0

@diegomachado wrote:

After migrate to Ionic Pro, I’m trying to configure a new method to send push notification. I can register the devices and send notification with OneSignal, but I’m can’t get PlayerId or send tags.

This is my code:

    this.oneSignal.startInit('xxxxxx', 'xxxxxx');

    this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.InAppAlert);

    this.oneSignal.handleNotificationReceived().subscribe(() => {
      console.log('push received')
    });

    this.oneSignal.handleNotificationOpened().subscribe(() => {
      console.log('push opened')
    });

    this.oneSignal.sendTag('device_uuid', this.device.uuid);

    this.oneSignal.getIds()
    .then((id) => {
      console.log(id);
    })

    this.oneSignal.endInit();

I’m doing something wrong? If not, what is the best alternative to do this (maybe another plugin)?

Thank you

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49227

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>