Share bitmap question (how to)

pluton

Active Member
Licensed User
Longtime User
Hi
I know how to share a text:

B4X:
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
 

Ratna Fang

Member
Licensed User
Longtime User
thx alot, erel. i got the poitn now.
but could you tell me what library you are using in this example?
i see your
B4X:
Dim u As Uri
is normal and i got red.
 
Upvote 0
Top