Am trying to send 10 text files as email attachments.
My app is like a journal and the beta testers want to be able to backup their entries in case the phone gets damaged.
How does "android.intent.action.SEND_MULTIPLE" or its' replacement do this.
Thanks in advance.
My app is like a journal and the beta testers want to be able to backup their entries in case the phone gets damaged.
How does "android.intent.action.SEND_MULTIPLE" or its' replacement do this.
Thanks in advance.
B4X:
Sub Button1_Click
'copy the file to the shared folder
File.Copy(File.DirAssets, "0b.txt", Starter.shared, "0b.txt")
File.Copy(File.DirAssets, "2.txt", Starter.shared, "2.txt")
File.Copy(File.DirAssets, "3b.txt", Starter.shared, "3b.txt")
Dim in As Intent
in.Initialize(in.ACTION_SEND, "")
in.SetType("text/plain") 'it is not related to the file itself.
' this next line sends one attachment
' in.PutExtra("android.intent.extra.STREAM", CreateFileProviderUri(Starter.shared, "0b.txt"))
' this next line fails: Can't attach empty file, even though second file is not empty
' in.PutExtra("android.intent.extra.STREAM", CreateFileProviderUri(Starter.shared, "0b.txt" & "2.txt"))
' this next line gives syntax error
' in.PutExtra("android.intent.action.SEND_MULTIPLE", CreateFileProviderUri(Starter.shared, "0b.txt" Starter.shared, "2.txt"))
in.Flags = 1
StartActivity(in)
End Sub
Attachments
Last edited: