D db0070 Active Member Licensed User Longtime User Nov 13, 2017 #1 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 Code: 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.
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 Code: 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.
Erel B4X founder Staff member Licensed User Longtime User Nov 14, 2017 #2 db0070 said: and it hangs there waiting for Main activity to start Click to expand... It doesn't hang. The activity just doesn't start. See CallSubDelayed rules: https://www.b4x.com/android/forum/t...teract-between-activities-and-services.18691/ Upvote 0
db0070 said: and it hangs there waiting for Main activity to start Click to expand... It doesn't hang. The activity just doesn't start. See CallSubDelayed rules: https://www.b4x.com/android/forum/t...teract-between-activities-and-services.18691/