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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:34:39+00:00 2026-06-17T04:34:39+00:00

In my program, there is some textfields and a button which is opens a

  • 0

In my program, there is some textfields and a button which is opens a camera intent. (assume that the page’s name is mainIntent)… Lets assume that, user fills textfields and clicked the button; cameraIntent opens, user shots the photo.. Now, I want program to return the page which have textfields and button. But if I do

Intent i = new Intent(cameraIntent.this, mainIntent.class);
startActivity(i);

All the texts which are written by user are gone. I need to use something like return mainIntent I suppose…

Can someone help me?

  • 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-06-17T04:34:40+00:00Added an answer on June 17, 2026 at 4:34 am

    Use startActivityForResult in first activity. So you will be able to return to calling activity. And you won’t lose data of edit texts.

    Intent i = new Intent(mainIntent.this, cameraIntent.class);
    startActivityForResult(i, MY_REQ_CODE);
    

    You can add this for onActivityResult():

    protected void onActivityResult(int requestCode, int resultCode, Intent data)
          {
          switch(requestCode) {
          case MY_REQ_CODE: 
                if (resultCode == RESULT_OK) {
                    //Do action that's needed
                    break;
                }
    
          }
    }
    

    In your activity next activity, you will just need to call setResult() and finish() as follows. You won’t need to start new activity here:

    Intent returnIntent = new Intent();
    returnIntent.putExtra("ImageName",imgName);   //Required if you want to pass some data back
    setResult(RESULT_OK,returnIntent);        
    finish(); 
    

    Hope it helps.

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

Sidebar

Related Questions

I have a program, and in that program there is some variables (username and
I came across a C++ program for my use, in which there was some
I'm developing a program that makes some floating points calculations. Is there any way
Is there some tool that can analyze a Java program and strip down the
Is there some merge strategy or program which is aware of key-value stores, in
This is a 2 part question. 1) Is there some sort of program that
I'm implementing a C# program that have some binary trees. Is there some addin
Is there some way by which I can configure eclipse to run a program
My program needs to know when a user ejects cd disc. Is there some
I have a program where there is a master/slave setup, and I have some

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.