Android Question FileProvider problems

imbault

Well-Known Member
Licensed User
Longtime User
Using FileProvider class, I'm unable to send any file : example :

B4X:
    If File.Exists(Starter.SharedFolder,"fullimage.jpg") Then
        File.Copy(Starter.SharedFolder, "fullimage.jpg", Starter.Provider.SharedFolder, "fullimage.jpg")
        
        message.Attachments.Add(Starter.Provider.GetFileUri("fullimage.jpg"))
    '    message.Attachments.Add(File.Combine(Starter.SharedFolder, "fullimage.jpg"))
    End If

    message.Subject="photo"
    message.Body =  "essai de photo"
    Dim in As Intent = message.GetIntent
    in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION
    StartActivity(in)

I've got the error :
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…