1. Are you ready for the Galaxy S20? Here is everything we know so far!

How to save EditText and Email.

Discussion in 'Android Development' started by Pooveshin, Jan 19, 2016.

  1. Pooveshin

    Pooveshin Newbie
    Thread Starter

    Hi All

    I am currently developing an android application and am in need of some help, I need have created a page with multiple EditText fields for user answers to appear, along with this is a save button to export those values to a text file. Can anyone help with a code that would instead with the click of a button be able to pass those values into an email to be emailed to the user?

    Any help would be much appreciated.
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Pooveshin

    Pooveshin Newbie
    Thread Starter

  3. Deleted User

    Deleted User Guest

    Ah right. If you post your code up we can advise further.
     
  4. Pooveshin

    Pooveshin Newbie
    Thread Starter

    This is my code for the email:
    public void email(View button){
    Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
    emailIntent.setType("plain/text");
    startActivity(emailIntent);
    startActivity(Intent.createChooser(emailIntent, "Send your email in:"));

    String aEmailList[] = { "property@venns.co.za"};

    emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, aEmailList);
    emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Property Query: ");
    emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Full Name:");

    emailIntent.setType("plain/text");
    emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Query and Telephone Number: ");

    startActivity(emailIntent);
    }
    When the email button is pressed the app must pull the figures from the EditText field into the email.
     
Loading...

Share This Page

Loading...