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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:28:09+00:00 2026-05-18T12:28:09+00:00

I have the following scenario: I have a chat activity, in it’s intent it

  • 0

I have the following scenario:

I have a chat activity, in it’s intent it gets the email of the contact for which to show the messages, the activity has singleTop as it’s launchmode

By sliding my finger over the screen I switch between different conversations, I do this by calling startActivity with the new intent: onPause will be called, followed by onNewIntent, in which I do setIntent, followed by onResume. In onResume I get the new intent, all good so far.

Then I change the orientation: onPause is called, followed by onDestroy, at this point getIntent returns the correct intent, followed by onCreate which has the old intent, followed by onResume, which also has the old intent

I’ve found this -> http://groups.google.com/group/android-developers/browse_thread/thread/7f0389f349e1ee3b to explain this behavior but it doesn’t happen on my HTC desire with android 2.2, using the emulator I found it happens on 1.5, but not on 1.6

So my question: Is this normal on 1.5 ? If so, how can I change the behavior of the activity so this doesn’t happen again ?

I know I can change the launchmode from singleTop to standard but this will also affect android 1.6+ which I don’t want because with singleTop, the changing of conversation goes fast (only onPause and onResume are called), with standard onCreate and onDestroy are also called…

Maybe there is something I can do with the intent flags I haven’t found yet, the flags I change in the code so I can have a “if sdk is 3” check…

Thanks for reading, Danny

  • 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-18T12:28:09+00:00Added an answer on May 18, 2026 at 12:28 pm

    You can possibly work around it by overriding onRetainNonConfigurationInstance() and return the latest intent, which you can then retrieve using getLastNonConfigurationInstance().

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

Sidebar

Related Questions

I have the following scenario. I'm working with a server which has a lib
I have the following scenario: in activity A, when a user clicks a button,
I have the following scenario. The client code only has access to FooHandler, not
Have the following scenario. I have a few form, which essentially have a few
I have following scenario: alt text http://static.zooomr.com/images/7579022_e64808b855_o.png We have a WebService which poses as
I have the following scenario: 1 List which contains the months of the year:
I have the following scenario: I have five fields in my database (name, email,
I have the following scenario: My page has a dropdown list that allows user
I have the following scenario : I’m pushing 100 messages to a queue shared
I have following scenario Then I have function which checks following condition: var callback

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.