Hi,
i use this Code to send a eMail with Attachment:
worked well so far
now i become a crash Log:
android.os.FileUriExposedException: file:///storage/9016-4EF8/Android/data/.....File.adi exposed beyond app through ClipData.Item.getUri()
- The System with this error run with API 24/Android 7
- without the Attachment it works (the Starter Service Send successfull the CrashLog)
- Target SDK is 26
- on other (with Android 6 and below) it works fine
Is this a "File Provieder" Problem?
(https://www.b4x.com/android/forum/threads/sharing-files-from-your-app-with-file-provider.70458/)
What can I do to solve the problem?
i use this Code to send a eMail with Attachment:
B4X:
Sub SendMail(varPhat As String, varDatei As String)
Dim Message As Email
Dim vSubject As String
vSubject= "LogFile: " & varDatei
'Message.To.Add("[email protected]")
Message.Subject = vSubject
Message.Body = ""
Message.Attachments.Add(File.Combine(varPhat, varDatei))
StartActivity(Message.GetIntent)
End Sub
worked well so far
now i become a crash Log:
android.os.FileUriExposedException: file:///storage/9016-4EF8/Android/data/.....File.adi exposed beyond app through ClipData.Item.getUri()
- The System with this error run with API 24/Android 7
- without the Attachment it works (the Starter Service Send successfull the CrashLog)
- Target SDK is 26
- on other (with Android 6 and below) it works fine
Is this a "File Provieder" Problem?
(https://www.b4x.com/android/forum/threads/sharing-files-from-your-app-with-file-provider.70458/)
What can I do to solve the problem?