Android Question CallSubDelayed with FireBase not working

db0070

Active Member
Licensed User
Longtime User
I have a service which calls a MediaPlayer activity. The Mediplayer activity then sets the next alarm in its Pause section and I have this line to send a notification using FireBase - using Erel's example code

B4X:
  CallSubDelayed3(Main,"SendMessage", "Next Alarm Time", ms)

I get this message in the log when I exit MediaPlayer:

sending message to waiting queue (CallSubDelayed - SendMessage)

and it hangs there waiting for Main activity to start - this means that Firebase is not fired and so my notification does not go. I thought CallSubDelayed will start the activity as required when a sub in its activity is called. If the Main activity is already running then the Firebase message is sent. I tried putting SendMessage in MediaPlayer but weird things happen, like the Main activity is started and keeps repeating.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…