Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7171875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:30:04+00:00 2026-05-28T15:30:04+00:00

I have been working with Java and Xml for a few months now, and

  • 0

I have been working with Java and Xml for a few months now, and have learned a great deal thanks to everyones help on StackOverflow.

My question is about java programming for android in relation to the submit button.

Currently I am trying to figure out how to submit a value to an email address (behind the scenes)

Lets say we have a text field and a button; I want to take the value entered in the text field, and submit that to an email address onclick.

I am unable to find anything online that shows me how to do this.

Thank you in advance for reading through my post and I look forward to your suggestions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:30:05+00:00Added an answer on May 28, 2026 at 3:30 pm

    This is a great example of how using Intents can come in great handy!
    Android has a bunch of pre-defined Intents that do certain things within the system; you may have clicked on a picture before and a dialog popped up asking whether you would like to view it in your gallery or in a third-party app such as Astro. The viewing of an image has its own pre-determined intent.

    Sending an email also has its own pre-determined intent: android.content.Intent.ACTION_SEND. You’ll need to create an intent with that property and then attach extra information (ie. the address to send to, the subject/message body, etc.).

    Example code:

    // Data members
    private Intent emailIntent;
    private String feedback;
    private EditText feedbackBox;
    
    // Create the Intent, and give it the pre-defined value
    // that the Android machine automatically associates with
    // sending an email.
    emailIntent = new Intent(android.content.Intent.ACTION_SEND);
    emailIntent.setType("plain/text");
    
    // Put extra information into the Intent, including the email address
    // that you wish to send to, and any subject (optional, of course).
    emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"your_email@whatever.com"});
    emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Insert subject here");
    
    // Acquire feedback from an EditText and save it to a String.
    feedback = feedbackBox.getText().toString();
    
    // Put the message into the Intent as more extra information,                   
    emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, feedback);
    
    // Start the Intent, which will launch the user's email 
    // app (make sure you save any necessary information in YOUR app
    // in your onPause() method, as launching the email Intent will
    // pause your app). This will create what I discussed above - a
    // popup box that the user can use to determine which app they would like
    // to use in order to send the email.
    startActivity(Intent.createChooser(emailIntent, "Insert title for dialog box."));
    

    I hoped this helped!!

    Some sources you might like to check out:
    http://developer.android.com/guide/topics/intents/intents-filters.html
    http://developer.android.com/reference/android/content/Intent.html#ACTION_SEND

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working with Java a couple of years, but up until recently
I have been working in Java/J2ee projects, in which I follow the Maven structure.
I have been working on a Java project for a class for a while
I have been working on Eclipse recently. I am fairly new to java programming,
Would a LINQ for java be a useful tool? I have been working on
I have been working on a simple Java app. I had it compiling and
I have been working with python for a while now. Recently I got into
I have been working on a web services related project for about the last
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#)
I have been working with a string[] array in C# that gets returned from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.