Android Question Share 2 label.text

Isac

Active Member
Licensed User
Longtime User
What do I want to do?

I would like to share the text of 2 labels by pressing on an image.

I tried this way, but only one label is shared



Code: Copy
Sub ImageView7_Click
    Dim in As Intent
    in.Initialize(in.ACTION_SEND, "")
    in.PutExtra("android.intent.extra.TEXT", Label3.Text)
    in.PutExtra("android.intent.extra.TEXT", Label4.Text)
    in.SetType("text/plain")
    in.WrapAsIntentChooser("Share Via")
    StartActivity(in)
End Sub
 
maybe this is what you are looking for:

Code: Copy
Sub ImageView7_Click
    Dim str as string = Label3.Text & " " & Label4.Text
    Dim in As Intent
    in.Initialize(in.ACTION_SEND, "")
    in.PutExtra("android.intent.extra.TEXT", str)
    in.SetType("text/plain")
    in.WrapAsIntentChooser("Share Via")
    StartActivity(in)
End Sub
 
Upvote 0
Upvote 0
Back
Top