How to share any file with Intent method ?

androgene

New Member
Hello,

I'm want to send a file, located in sdcard, with the Intent method. Via share...

I suppose the problem is about uri of the file, i'm not sure.

This code didn't work, the share method appears but no file is sended :

B4X:
Dim i As Intent
i.Initialize(i.ACTION_SEND, "")
i.SetType("*/*")
i.PutExtra("android.intent.extra.STREAM", "file:///sdcard/MyFile.bin")
i.WrapAsIntentChooser("Share via")
StartActivity(i)

How to send any file with Intent ?
 
Top