Hi,
I try to add an attachment to a mail intent.
I use:
ImageView1 is filled by the file, so he exist but no attachment. Using Outlook App.
Can someone help?
Kind regards,
André
I try to add an attachment to a mail intent.
I use:
B4X:
Sub btnMail_Click
Dim in As Intent
btnMail.Visible=False
Dim PanelShot As B4XBitmap = ScrollView2D1.Panel.As(B4XView).SnapShot
ImageView1.Visible=True
Dim Out2 As OutputStream = File.OpenOutput(xui.DefaultFolder, "Geleide"&Formuliernr.Text&".jpg", False)
PanelShot.WriteToStream(Out2, 50, "JPEG")
Out2.Close
ImageView1.Bitmap=LoadBitmap(xui.DefaultFolder,"Geleide"&Formuliernr.Text&".jpg")
Log(xui.FileUri(xui.DefaultFolder,"Geleide"&Formuliernr.Text&".jpg"))
in.Initialize(in.ACTION_SEND,"mailto:[email protected]")
in.PutExtra("android.intent.extra.SUBJECT", "this is the subject")
in.PutExtra("android.intent.extra.TEXT", "this is the body")
in.PutExtra("android.intent.extra.STREAM", xui.FileUri(xui.DefaultFolder,"Geleide"&Formuliernr.Text&".jpg"))
StartActivity(in)
btnMail.Visible=True
End Sub
ImageView1 is filled by the file, so he exist but no attachment. Using Outlook App.
Can someone help?
Kind regards,
André