I'm having a problem getting code to run after sending an email (see code below) which illustrates the problem.
The code after the line -- StartActivity(emsg.GetIntent) -- gets ignored -- so the MsgSentCk sub does not get run. It appears that after the email is sent (user presses send) the program resumes in the Main Activity ignoring the -- MsgSentCk -- code line. Is there anyway to get program flow to include code lines after sending an email?
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
			
			The code after the line -- StartActivity(emsg.GetIntent) -- gets ignored -- so the MsgSentCk sub does not get run. It appears that after the email is sent (user presses send) the program resumes in the Main Activity ignoring the -- MsgSentCk -- code line. Is there anyway to get program flow to include code lines after sending an email?
			
				B4X:
			
		
		
		Sub SendEmail
    Dim msg As String
    msg="ok"
    email="[email protected]"
    Dim emsg As Email
    emsg.To.Add(email)
    emsg.Subject=msg
    emsg.Body=msg
    StartActivity(emsg.GetIntent)
    MsgSentCk
End Sub
Sub MsgSentCk
    Msgbox("msg","sent")
End Sub