How create notification topic for Firebase and use this?

后端 未结 1 1289
执笔经年
执笔经年 2020-12-21 07:24

I can create notifications for single user and for all users in my app, but I can\'t understand and find information about notification with create topic. For this need cre

相关标签:
1条回答
  • 2020-12-21 07:56

    There is no need to create a service when you want to subscribe to a topic. Just call anywhere in your app:

    FirebaseMessaging.getInstance().subscribeToTopic("news");
    

    Also see the section Subscribe the client app to a topic in the Firebase documentation.

    0 讨论(0)
提交回复
热议问题