Android Question share multiple "edit text" content

Discussion in 'Android Questions' started by serkan17, Apr 24, 2019.

  1. serkan17

    serkan17 Member Licensed 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.

    Code:
    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: Apr 24, 2019
  2. DonManfred

    DonManfred Expert Licensed 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?
     
  3. serkan17

    serkan17 Member Licensed User

    I want to share all the entries and outputs in the program.
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      53.2 KB
      Views:
      26
  4. DonManfred

    DonManfred Expert Licensed 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.
     
    serkan17 likes this.
  5. serkan17

    serkan17 Member Licensed 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
     
  6. DonManfred

    DonManfred Expert Licensed User

    Put everyhing in a long string and stare this string instead of a file then.
    There are no other possibilities.
     
    serkan17 likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice