Hi all!
I have two activities: Main and SecondActivity
I have also a service listening for push messages and display notifications: this is the code that opens the SecondActivity if i click on the notification:
n.SetInfo("Test", "New Message from " & user, SecondActivity)
and this is the code of the SecondActivity:
Sub Activity_Create(FirstTime As Boolean)
Activity.Color = Colors.ARGB (255, 111, 111, 111)
ToastMessageShow("OK", False)
CallSubDelayed(Main, "OpenFromNotification_Click")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
Activity.Finish
End Sub
Everything works fine if the app is closed. I click on the notification and Voilà it starts OpenFromNotification_Click sub in Main activity.
Tre problem occours when the Main activity is opened: if I click on the notification when the main activity is opened nothing happens.
Seems like the SecondActivity is not launched, infact the ToastMessageshow doesn't pops up.
My question is: how i start "OpenFromNotification_Click" subroutine from notification even the main activity is open?
Thanks in advance