Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Push Notification: What does push.init(pushOptions) exactly do?

$
0
0

@gauz09 wrote:

I am implementing Push Notification in my app and a bit confused on what some of the things mean. Can somebody please point me to correct documentation about Push Notification in Ionic?

For example, I am not sure what the following actually does. I mean, from the simple english point of view, it's basically initializing, I hope.

let pushOptions: PushOptions = {
     android: { senderID: 'XXXXXXXXXX' },
     ios: { alert: 'true', badge: 'true', sound: 'true' },
     windows: { }
};

let pushObject: PushObject = this.push.init(pushOptions);

pushObject.on('registration').subscribe((data: any) => {.....

From the last statement, it looks like the this.push.init() is registering my app(?) or (device?) with the PNS specified in pushOptions.
It gives a "registrationId" which I can use to identify a device while sending push notification.

I think I figured out somewhat but is there any documentation available?

Thanks.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



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