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

  • SEARCH
  • Home
  • 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 6841939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:01:55+00:00 2026-05-27T00:01:55+00:00

I am currently writing an app that within a certain activity, we want the

  • 0

I am currently writing an app that within a certain activity, we want the user to be able to take and email a photo to a desired email address. I am able to do both of these (take a photo, and send a photo) separately, BUT when I run them together, the email client list comes up over the camera… I cant seem to figure out why it is not running after the camera itself.. Any help?

***Here is what I have now:

public class PhotoHandler extends Activity {

private final static int TAKE_PHOTO_CODE = 1;
File downloadedPic = null;
Intent in;

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.mnwv_main);

  downloadedPic = takeandReturn(this);
}

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data)
{

  try {            
      Intent picMessageIntent = new Intent(android.content.Intent.ACTION_SEND);            
      picMessageIntent.setType("image/jpeg");
      picMessageIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(downloadedPic));
        picMessageIntent.putExtra(Intent.EXTRA_EMAIL  , new String[]{});
      picMessageIntent.putExtra(Intent.EXTRA_SUBJECT, "MNWV - Check Out This Photo!");
        picMessageIntent.putExtra(Intent.EXTRA_TEXT   , "*** Please Describe the Photo Taken Below (Include Your Name, Location, etc.)... ***");
      startActivity(Intent.createChooser(picMessageIntent, "Send Picture Using: ")); 
  } catch (Exception e) {
      Log.e("TAG", "sendPictureMessage() failed to start activity.", e);
      Toast.makeText(this, "No handler", Toast.LENGTH_LONG).show();
  } 
}  
  • 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-27T00:01:55+00:00Added an answer on May 27, 2026 at 12:01 am

    You must use startActivityForResult for taking the photo. After that you must use onActivityResult to send email:

       @Override
       public void onActivityResult(int requestCode, int resultCode, Intent data)
       {
           // TODO: Test for requestCode and resultCode
           try {            
               Intent picMessageIntent = new Intent(android.content.Intent.ACTION_SEND);            
               picMessageIntent.setType("image/jpeg");
               picMessageIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(downloadedPic));
               startActivity(Intent.createChooser(picMessageIntent, "Send Picture Using: "));
           } catch (Exception e) {
               Log.e("TAG", "sendPictureMessage() failed to start activity.", e);
               Toast.makeText(this, "No handler", Toast.LENGTH_LONG).show();
           }
       }
    

    Hope it will help.

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

Sidebar

Related Questions

I'm currently writing a Java app that interfaces with a MySQL database. My problem
I'm currently writing an app in Android that works with the GPS. At the
I am currently writing a simple, timer-based mini app in C# that performs an
I'm writing an application that is currently a pure QT4 app. It is designed
I'm currently writing an app that posts some data to a HTML form and
I am currently writing an app in python that needs to generate large amount
I'm currently writing a small python app that embeds cherrypy and django using py2app.
I'm currently writing a Rails 3 app that uses the google maps API (v3)
I am currently writing an App that needs the ability to modify and persist
I'm currently writing a small app that takes data provided by an SQL stored

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.