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 6217817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:29:27+00:00 2026-05-24T07:29:27+00:00

First, I launch the camera app to capture picture. Once it is done, I

  • 0

First, I launch the camera app to capture picture. Once it is done, I put the image path to extra to launch a edit view activity. When I execute this activity, I found it always return to this activity after picture taken and then start the edit activity. How could I avoid to come back to this activity and start the edit activity right after the picture is taken from camera view?

public void onSnapBtnClick(View v ) {
    Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
    mImagePath = createImagePath();
    intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(mImagePath)));
    startActivityForResult(intent, ACTIVITY_SNAP);
}


@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
if (requestCode == ACTIVITY_SNAP && resultCode == Activity.RESULT_OK) {
    File fi = null;
    try {
    fi = new File(mImagePath);
    } catch (Exception ex) {
    Log.w(Config.LOGTAG, "mImagePath not exist " + mImagePath);
    }

    if (fi != null && fi.exists()) {

    String randomId = UUID.randomUUID().toString();
    new ImageUploadAsynTask().execute(randomId);
    Intent editIntent = new Intent(this, ShopinionEditTextActivity.class);
    editIntent.putExtra(GeatteDBAdapter.KEY_IMAGE_PATH, mImagePath);
    editIntent.putExtra(Config.EXTRA_IMAGE_RANDOM_ID, randomId);
    startActivity(editIntent);
    } else {
    Log.w(Config.LOGTAG, "file not exist or file is null");
    }

} 
}
  • 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-24T07:29:28+00:00Added an answer on May 24, 2026 at 7:29 am

    I belive this is impossible because you are launching a seperate app activity which you have no control over. Instead, do this:

    From your home activity, launch the EditActivity. The EditActivity will have code that immediately in the onCreate launches the camera app using startActivityForResult(); The user should not be able to see the activity if you launch another one in the onCreate method.

    In the EditActivity’s onActivityResult have it check the return code, and do whatever you need. If the picture was taken successfully, continue using the Edit activity. IF not, finish and go back to the home activity.

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

Sidebar

Related Questions

I want to show the intro nib i made only at first app launch.
My app uses GPS. At first launch, user is asked if he want's to
In my app, I have an Activity that acts as a camera preview. I
I must show EULA on the first launch. I want to close the app
I want to show a message after the first launch of the app telling
I'm trying to display an image in a UIImageView only in the first launch
I need to recognize first launch of my application or activity. At this time
I make an app that accesses some data on the first launch and then
Is there a simple way to detect the first launch of a new click-once
I need to show one SecondActivity only once and only on first launch of

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.