I would like to share multiple text files (transfer them from the android device to a PC via bluetooth). I found a function from Erel to do this for images. I tweaked it in the obvious spots but I can't make it work for text files. I am hoping there is a simple explanation that someone can supply!
I know the file names are correct - I have a working share for single files using share.sharebinary.
Via Bluetooth I get this:
If I try to send it via GMail I get:
David.
B4X:
Sub ShareMultipleFiles(files As List)
Dim i As Intent
i.Initialize("android.intent.action.SEND_MULTIPLE", "")
i.SetType("text/plain")
Dim Uris As List
Uris.Initialize
For Each f As String In files
Dim u As Uri
u.Parse("file://" & f)
Uris.Add(u)
' Log(u)
Next
Dim jo As JavaObject = i
jo.RunMethod("putParcelableArrayListExtra", Array As Object("android.intent.extra.STREAM", Uris))
StartActivity(i)
End Sub
I know the file names are correct - I have a working share for single files using share.sharebinary.
Via Bluetooth I get this:
Sending 3 files to "MyPC"
Bluetooth Share: File Unknown file not sent
Bluetooth Share: File Unknown file not sent
If I try to send it via GMail I get:
Couldn't attach file
David.