Hi,
i send a email with this code, but in SDK>23 get error when Attach file :
android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.xxxxxx/files/share/xxxxx.jpg exposed beyond app through ClipData.Item.getUri()
i send a email with this code, but in SDK>23 get error when Attach file :
android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.xxxxxx/files/share/xxxxx.jpg exposed beyond app through ClipData.Item.getUri()
B4X:
Sub sendemail(destinatario As String, subject As String, body As String, filecombineattachment As String)
Dim Msg As Email
Dim nt As Intent
Msg.To.Clear ()
Msg.To.Add(destinatario.trim)
Msg.BCC.add(correo.trim)
If subject.Trim <> "" Then Msg.Subject = subject.trim
Msg.Body = body
If filecombineattachment<>"" Then Msg.Attachments.Add(filecombineattachment)
nt= Msg.GetIntent
nt.SetType("message/rfc822")
StartActivity(nt)
End Sub