aaronk Well-Known Member Licensed User Longtime User Feb 5, 2019 #1 Hi, I am using firebase notifications in my app. I followed the tutorial and it says the following code needs to be called from the starter service: Code: Copy Sub Service_Create CallSubDelayed(FirebaseMessaging, "SubscribeToTopics") End Sub Just wondering, does this need to be called every time or just the once ? In B4i when I subscribe I can just subscribe the once and it is subscribed until I call unsubscribe from the topic. In my B4A app I have multiple activity's and each page has a button to subscribe to a topic. Do I need to subscribe to each topic every time my app runs? Or it is automatically subscribed once I call: Code: Copy fm.SubscribeToTopic(topic) Just trying to work out why I need call SubscribeToTopics when the starter service starts every time.
Hi, I am using firebase notifications in my app. I followed the tutorial and it says the following code needs to be called from the starter service: Code: Copy Sub Service_Create CallSubDelayed(FirebaseMessaging, "SubscribeToTopics") End Sub Just wondering, does this need to be called every time or just the once ? In B4i when I subscribe I can just subscribe the once and it is subscribed until I call unsubscribe from the topic. In my B4A app I have multiple activity's and each page has a button to subscribe to a topic. Do I need to subscribe to each topic every time my app runs? Or it is automatically subscribed once I call: Code: Copy fm.SubscribeToTopic(topic) Just trying to work out why I need call SubscribeToTopics when the starter service starts every time.
Erel B4X founder Staff member Licensed User Longtime User Feb 5, 2019 #2 The starter service only starts once when your app starts. You do not need to resubscribe to already subscribed topics. Upvote 0
The starter service only starts once when your app starts. You do not need to resubscribe to already subscribed topics.