mytext = "some text"
Sub share_Click
share.Initialize(share.ACTION_SEND,"")
share.SetType("text/plain")
share.PutExtra("android.intent.extra.TEXT", mytext)
share.WrapAsIntentChooser("Share text:)")
StartActivity(share)
End Sub
But how I can share a bitmap. I have tried:
B4X:
Sub share_Click
share.Initialize(share.ACTION_SEND,"")
share.SetType("image/jpeg")
share.PutExtra("android.intent.extra.stream", mypicture)
share.WrapAsIntentChooser("Share Photo:)")
StartActivity(share)
End Sub
Dim i As Intent
i.Initialize(i.ACTION_SEND, "")
i.SetType("*/*")
i.PutExtra("android.intent.extra.TEXT", "This is the text")
Dim u As Uri
u.Parse("file://" & File.Combine(File.DirRootExternal, "1.jpg")) '<-- change to a valid image file
i.PutExtra("android.intent.extra.STREAM", u)