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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:05:23+00:00 2026-05-27T04:05:23+00:00

I call camera to take a picture. But I cannot go back to my

  • 0

I call camera to take a picture. But I cannot go back to my own original activity after taking the picture. What’s the problem? Thank you.

    public void addEntry(View view)
{
              String EntryName=RegisterName.toString();
              Toast.makeText(this, EntryName, Toast.LENGTH_LONG);
              Intent addEntryintent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
              File file = new File(getFilesDir(),EntryName);
              registeryFileUri = Uri.fromFile(file);
              addEntryintent.putExtra(MediaStore.EXTRA_OUTPUT, registeryFileUri);
              startActivityForResult(addEntryintent,TAKE_PICTURE);         

}


@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      if (requestCode == TAKE_PICTURE) 
      {
          if (data != null)
          {   
         Toast.makeText(this, "Successfully Registered!", Toast.LENGTH_LONG);
         ImageView Registerimage= (ImageView)findViewById(R.id.RegisterPicture);
         Registerimage.setImageURI(registeryFileUri);
         }

    }
  }
  • 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-27T04:05:24+00:00Added an answer on May 27, 2026 at 4:05 am

    Answer

    Use appContext.getExternalCacheDir() and don’t forget to mention permissons.

        @Override
            protected void onActivityResult(int requestCode, int resultCode, Intent data) {
                  if (requestCode == TAKE_PICTURE) 
                  {
                          if(resultCode==Activity.RESULT_OK)
                      { //if (data != null)
                        //{   
                        Toast.makeText(this, "Successfully Registered!", Toast.LENGTH_LONG);
                        ImageView Registerimage= (ImageView)findViewById(R.id.RegisterPicture);
                        Registerimage.setImageURI(registeryFileUri);
                        //}
                           }
                          else
                             Toast.makeText(this, "Not Registered!", Toast.LENGTH_LONG);
                 }  
    **"android.permission.CAMERA"**     
    
    Check whether the above permission is specified in your manifest or not
    
    Note: It's better to use getExternalCacheDir() than getFilesDir() if you still dont get the 
          image then use that. Dont forgot to specify the permission "android.permission.WRITE_EXTERNAL_STORAGE" if you use the getExternalCacheDir().
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

RESOLVED : issue was unrelated to Android camera or SDK, but rather my own
i am developing a program which uses the android camera to take pictures. but
I noticed the default camera activity I call on a Droid X is different
After successfully acquiring a picture from the iPhone camera on iOS 4.1, you can
I want to call system camera and take lots of photo in system view,
I use Intent it = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); to take photos by call up camera.
I'm trying to draw something on the camera preview. But when the program call
I'm dealing with a random problem which related to camera usage. Before I call
I call the following function with a mouseover event but it's not working. My
I call this a flash meeting, but maybe there is another more appropriate name.

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.