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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:55:18+00:00 2026-06-12T17:55:18+00:00

i have a android application where i tae a picture in a intend like

  • 0

i have a android application where i tae a picture in a intend like this:

Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(f));
startActivityForResult(takePictureIntent, actionCode);

then i fill a ImageView with the result.

now i found a bug, then i want to take a picture and during the camera is open i rotate the screen and take the picture, i dont get a result in my ImageView.

Only when not rotating the camera, while taking a picture i see it in the ImageView.

how to solve this?

  • 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-12T17:55:19+00:00Added an answer on June 12, 2026 at 5:55 pm

    I assume you have a get results method.

    Make sure your file location hasnt been cleaned because of rotate(aka you are looking in the wrong place).

    I had this problem. I was setting a global variable of where to save the photo to.
    I passed this to the intent to take photo, and on return looked at that location to display photo.

    However, if you rotate the screen, the global variable is destroyed, and so on result, it no longer knows where to find the photo.

    The best thing to do is to save it to the saved instance, and reinitialse location onResume from the savedInstance.

    See here on how to do it.

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

Sidebar

Related Questions

I have an Android application, backed by an API. To this API users can
I have an Android application with this lines in the manifest: <uses-sdk android:minSdkVersion=8 android:targetSdkVersion=13/>
I have an android application with a lot of communication. I'd like to run
I have this android application which uses java-javascript bridge to pick up information from
I have an Android application that works with sms messages. When new sms message
i have this android application that requires to load data from a remote server
I have an Android application which uses a intent. here is the code: private
I have an android application uses Alertdialog.I am setting animation for this dialog.I want
I have an android application on android market, this application created with sqlite database
I have an android application and web-server working together. Now I want user log

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.