I have a main activity and a 2nd activity ("sendact") that send e-mails to several addresses.
The "sendact" activity does some processing deciding where to send and uses:
Activity "sendact" has the Smtp event sub:
The problem is that since "sendact" is finished, the ToastMessage is not shown. Log says:
sending message to waiting queue (smtp_messagesent)
Only if switched again immediately to "sendact" does the ToastMessage shown.
Is there a way to cause the ToastMessage to be shown even when Main is active again?
I know I can use Activity.Finish & StartActivity(Main) in Sub Smtp_MessageSent
but I want to immediately switch back to Main once Smtp.Send is executed.
The "sendact" activity does some processing deciding where to send and uses:
B4X:
.....
Smtp.Send
Activity.Finish
StartActivity(Main)
Activity "sendact" has the Smtp event sub:
B4X:
Sub Smtp_MessageSent(Success As Boolean)
If Success Then
ToastMessageShow("Message sent", True)
Else
ToastMessageShow("Error: " & LastException.Message , True)
End If
End Sub
The problem is that since "sendact" is finished, the ToastMessage is not shown. Log says:
sending message to waiting queue (smtp_messagesent)
Only if switched again immediately to "sendact" does the ToastMessage shown.
Is there a way to cause the ToastMessage to be shown even when Main is active again?
I know I can use Activity.Finish & StartActivity(Main) in Sub Smtp_MessageSent
but I want to immediately switch back to Main once Smtp.Send is executed.