Hrishikesh Kulkarni
Hrishikesh Kulkarni

Reputation: 81

How to create a topic in Firebase using Ionic 2 rc.0?

I would like to subscribe to certain topics in Firebase for my Ionic 2 app, so I want to know how to create them in Ionic 2. An example code for demonstration would be great.Thanks in advance.

Upvotes: 2

Views: 410

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598785

There is no direct way to subscribe to topics using the Firebase Cloud Messaging for Web API.

However, you can use the GCM REST API to subscribe to the topic as described here: GCM: How do you subscribe a device to a topic?. Last time I checked, these subscriptions made in this way were delivered to the device correctly.

Also see my answer here: Is it possible to broadcast messages in a production PWA using FCM for Web without having a dedicated XMPP server?

Upvotes: 1

Related Questions