I would like to open the email via mia application with the command like:
Dim MyIntent As Intent
MyIntent.Initialize(MyIntent.ACTION_MAIN,"")
MyIntent.SetComponent("com.android.email")
MyIntent.AddCategory("android.intent.category.LAUNCHER")
If MyIntent.IsInitialized Then
StartActivity(MyIntent)
End If
Unfortunately it is opening a window where I then have to select the application I want to open with. See image.
I would like the application to open automatically.
Thanks
Lorenzo
Sub SendMail(SendTo As String, SendBody As String, SendSub As String, SendAtt As String)
Dim ei As Email
SendTo = SendTo.Trim
ei.To.Add(SendTo)
ei.Body = SendBody
ei.Subject = SendSub.Trim
If SendAtt <> "" Then
ei.Attachments.Add(SendAtt)
End If
Try
StartActivity(ei.GetIntent)
Catch
Msgbox("Email Client Could Not Be Accessed, Please Make Sure You Have Setup Your Email Client", "NOTICE")
End Try
End Sub
One note, if the default email client has not been setup it may not work as expected. Check the device that did not work and be sure the email has been setup.