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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:05:48+00:00 2026-06-13T12:05:48+00:00

I am developing an app with capturing the image as one of the feature.

  • 0

I am developing an app with capturing the image as one of the feature. In my home screen i have two spinner. After selecting spinner values user can go capturing the picture by clicking take picture button. Up to this working fine. But the problem resides in Camera App Orientation.

Take Picture button launches the camera.When image get captured it saved(absolutely fine) and came back to the parent activity. But the problems is it refreshes the activity. while coming back i can see following wired things

1.)Some times it shows landscape screen(1second) and back to portait which refreshes the activity and results in resetting the Spinner values.

2.) Some times it just resets the Spinner values.

It’s really annoying. I haven’t got any clue to get rid this problem. I hope some of you guys will solve this.

Much Appreciated.

  • 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-13T12:05:49+00:00Added an answer on June 13, 2026 at 12:05 pm

    It’s good to be prepared for anything when you’re launching an activity in another app (Camera). The activity could return bad data, the screen orientation could be changed, or it could be a very long time before the user returns to your app. From your description, it sounds as though the orientation is changing every time the Camera app is launched.

    Android has built-in state management methods to handle this type of scenario. You can override the onSaveInstanceState() method to store your activity’s state (e.g., spinner values), and then restore that state in onCreate(). (Example here.) This will handle the case in which you’re launching the Camera app, or your user presses the Home button and then returns to the app, etc.

    EDIT:

    onRestoreInstanceState() is only called if your activity is killed due to memory pressure and then recreated later. It’s much more reliable to use the Bundle passed to onCreate() (which is called again after device rotation) instead. That Bundle will contain everything that was stored in onSaveInstanceState().

    If you need to postpone your work until onResume(), you’ll want to use onCreate() to populate some member variables in your Activity class, and then make use of those variables in onResume().

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

Sidebar

Related Questions

i am developing app which check whether user has selected any screen lock pattern
While developing an app in HTML and jQuery, I have a loading screen that
Hi I am developing a app that captures images and email it capturing the
Im developing an app for iPhone, in wich one of the functionalities is an
I am developing facebook app in which i am fetching user's friend detail in
I am developing app that has multiple skins and I have a dilemma on
Im developing a app which has a user sign-up activity, there I need to
i am developing app that would receive data from server any time. i have
Am developing an app which has a calculator function: for example, i have 4
i am developing app in Blackberry which have GPS Functionality. so first i want

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.