Android Question share multiple "edit text" content

serkan17

Member
Licensed User
Longtime User
Hello,
How to share multiple "edit text" content.
Each one will be on a new line.

FileToSend class with .txt file is sending, but I want to share it as a text, not the file.

B4X:
    Dim FileToSend As String = "Message.txt"
    File.WriteString(Starter.Provider.SharedFolder, FileToSend, ("Projectname:"&EditText_projectname.text&CRLF&"Capacity:"&TextBox_capa.text))
    Dim in As Intent
    in.Initialize(in.ACTION_SEND, "")
    in.SetType("text/plain")
    in.PutExtra("android.intent.extra.STREAM", Starter.Provider.GetFileUri(FileToSend))
    in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION
    StartActivity(in)
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
You can not share multiple actions. You can share a string or a file. ONE at a time. One String or ONE File.
What exactly are you trying to archieve?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Create a textfile with all the infos and share the file. Or create an image containing all the infos and share the image.

As written: you only can do one share action at a time.
If you want to share multiple infos then you probably should use a textfile with all the infos and share the textfile.

If you share the file with a programm by you this program can read the file and extract all data needed.
All other programs usually do not have any info about it and just use the file. sending in an email as attachment for ex it is in the attachment.

It all depends on what you are EXACTLY trying to archieve. Share with what app?

What exactly are you expecting to happen?

You are not providing enough infos.
 
Upvote 0

serkan17

Member
Licensed User
Longtime User
I want to send all information with an application like "whatsapp, sms, google keep note, instagram direct".
I don't want to save it in a text file and read it again. I want to share like normal letter.

Thanks DonManfred
 
Upvote 0
Top