Android Question How to handle the new receiver modules

Andie

Member
Licensed User
Longtime User
I created an app that receives push notifications via the “subscribe-to-topic” feature. So far, I have a Main module, a Starter module (including the Subs Process_Globals, Service_Create, Application_Error and the empty Subs Service_Start, Service_TastRemoved, Service_Destroy) and the FirebaseMessaging module (including the Subs Service_Create and Service_Start). Am I right, that I have to create a new Sub Receiver_Receive within the FirebaseMessaging module containing the code, which before was in the Subs Service_Create and Service_Start? And: Is the starter module still needed?
 

DonManfred

Expert
Licensed User
Longtime User
and the FirebaseMessaging module (including the Subs Service_Create and Service_Start)
That´s wrong! With the newest B4A you should have a RECEIVER Module.

Check the updated FirebaseMessagingTutorial

 
Upvote 1

Andie

Member
Licensed User
Longtime User
Okay. I add the new module ReceiverModule, which contains the empty Subs Process_Globals and Receiver_Receive(FirstTime ....). Is that all, I have to do? The original FirebaseMessaging module will remain unchanged? Or do I have to copy any code in the new receiver module?
 
Upvote 0

Andie

Member
Licensed User
Longtime User
That means, that I have to copy the code from the old and no longer needed FirebaseMessaging module into the new receiver module? And what code does the Sub Receiver_Receive contain?
 
Upvote 0

Andie

Member
Licensed User
Longtime User
Thanks for the information. fm_MessageArrived is a method of the FirebaseMessaging object fm (fm is the common name for it), which is defined in Sub Process_Globals and initialized in Sub Service_Create and used in Sub SubscribeToTopics.
So, I can copy the code of the old FirebaseMessaging module into the new receiver module, where the code inside the old Sub fm_MessageArrived is now in Sub Receiver_Receive. Is that right?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…