Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any functions to check topic subscription or un-subscription status in Firebase Cloud Messaging?

In my settings screen, I provide users notifications switchers each topics. So I would like to make sure with the status when I subscribe or unsubscribe to turn-on or turn-off the switchers UI. Actually I found where can I get topics subscribed each users from this URL https://developers.google.com/instance-id/reference/server.

Is there any easier way to check them? (e.g. Get information about app)

e.g. Get information about app

like image 351
Jirawatee Avatar asked Dec 20 '16 04:12

Jirawatee


People also ask

How do I unsubscribe from topic FCM?

When a client app subscribes to a new topic name (one that does not already exist for your Firebase project), a new topic of that name is created in FCM and any client can subsequently subscribe to it. To unsubscribe, the client app calls Firebase Cloud Messaging unsubscribeFromTopic() with the topic name.

What is collapse_ key in FCM?

Firebase Cloud Messaging (FCM) The description of the properties is as follows: Collapse Key: Enter the collapse key. The collapse key parameter identifies a group of messages (for example, with collapse_key: updates available) that can be collapsed, so that only the last message is sent when delivery resumes.


1 Answers

Unfortunately, there is no direct API available as of the moment to check the subscriptions of a specific user on the Client Side. You'll only be able to check it using the Instance ID API.

However, perhaps you can implement something in your App Server to have the list of subscriptions the user has, and have it reflect in your Client App.

like image 156
AL. Avatar answered Sep 20 '22 22:09

AL.