0

I am trying to create this app where the user fills a form and then exports the form using email. However, I don't know how to go about it. I have searched online, but have reached so many dead ends. Is that possible or there is absolutely no way to export the xml page as a document? I tried using intent chooser, and extra text to get the string, but it just prints the string as words, and not into a file that can be exported.

droidnoob
  • 333
  • 5
  • 17
  • You are talking about exporting files and then about sending emails. What exactly is it that you are looking for? What's your best shot so far? – e4c5 Sep 17 '15 at 03:34
  • Did you check this answer? http://stackoverflow.com/questions/9974987/how-to-send-an-email-with-a-file-attachment-in-android You can save your file on the filesystem and pass the path in the intent. – Ajit Pratap Singh Sep 17 '15 at 03:52
  • @e4c5 i mean when the user fills the form, and then tries to export the filled form by e mail – droidnoob Sep 17 '15 at 04:06
  • @AjitPratapSingh so i save the filled form on the filesystem and then pass what path? – droidnoob Sep 17 '15 at 04:06
  • @AjitPratapSingh the link you gave is to send a file on the phone, I want the filled form – droidnoob Sep 17 '15 at 04:10
  • Perhaps it's a matter of getting your terminonlogy right? You want someone to fill a form on your app and you want to send that as an email. The term export probably shouldn't be here. THat's what's confusing everyone trying to help. Try this: http://stackoverflow.com/questions/2197741/how-can-i-send-emails-from-my-android-application The body of the email is something you will have to generate by adding your form fields together. – e4c5 Sep 17 '15 at 04:16
  • @e4c5 I'm sorry, you don't get me. Say this is a questionnaire app, the user goes on and fills the questionnaire, and then clicks send to send the filled form to whoever. I know how to use intent, I just need to know how to export the filled form to whoever. – droidnoob Sep 17 '15 at 04:34
  • Like I said , there is no export, you just need to email it. If you already know how to use intents what are you waiting for? – e4c5 Sep 17 '15 at 05:14
  • @e4c5 because it does not send the filled form – droidnoob Sep 17 '15 at 05:30
  • Refer my previous comment. Sometimes you have to write a bit of code "The body of the email is something you will have to generate by adding your form fields together" – e4c5 Sep 17 '15 at 05:31
  • do you mean like editText.getText.toString()? because it just takes the user's input one at a time, not sending it all at once as a document – droidnoob Sep 17 '15 at 05:32

1 Answers1

1

What you can do is make some document file like pdf or doc programatically and then attach that file in email.

KishuDroid
  • 5,411
  • 4
  • 30
  • 47
  • you mean like convert the page to a document?how? – droidnoob Sep 17 '15 at 05:08
  • I mean you can put your form content in some file and then attach it to email. Please check this link for your reference (generate pdf) http://www.dynamicpdf.com/Blog/post/2012/06/15/Generating-PDFs-Dynamically-on-Android.aspx – KishuDroid Sep 17 '15 at 05:37
  • thank you! that looks like what I am looking for. Will read through and mark if it answers my need! – droidnoob Sep 17 '15 at 05:54