Android Question Share Multiple Text.

shashkiranr

Active Member
Licensed User
Longtime User
Hi Erel,

How do you Share multiple Text ( from a list containing various texts)

Regards,
SK
 

shashkiranr

Active Member
Licensed User
Longtime User
Erel,

I have a list which has 3 strings - apple,mango,cherry

When i share all these string together consider in whatsapp i need three separate messages to be sent.

Regards,
SK
 
Upvote 0

shashkiranr

Active Member
Licensed User
Longtime User
Hi Erel,

Cant we use the below code . Maybe modify a bit. I have a list containing many texts and i want to share it at once like we do for multiple image.

B4X:
Dim i As Intent
   i.Initialize("android.intent.action.SEND_MULTIPLE", "")
   i.SetType("text/plain")
i.WrapAsIntentChooser("Share Using")
   Dim Uris As List
   Uris.Initialize
   For Each f As String In files
     Dim u As Uri
     u.Parse("file://" & f)
     Uris.Add(u)
   Next
   Dim jo As JavaObject = i
   jo.RunMethod("putParcelableArrayListExtra", Array As Object("android.intent.extra.STREAM", Uris)
   StartActivity(i)

Regards,
SK
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top