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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:33:46+00:00 2026-06-06T21:33:46+00:00

My application contains a main activity A and several other activities B, C, D,

  • 0

My application contains a main activity A and several other activities B, C, D, E that can be started only from the main activity A via the Menu.
For example if I’m in activity B and I click the Back button, then I always come back to the main activity A.

Considering again we are in activity B and I click the Home button. Then I have different behavior when clicking the launch icon of my app to return to the app :

  • On Gingerbread (tested on Emulator) this cause activity B to display and I’m able to go back to activity A be pressing the Back button.
  • On ICS the behavior is different, this cause a new activity A to start and if I click the back button in A then I come back to B. This not the expected behavior, the right one for me is the Gingerbread one.

Another example, if I’m in the main activity A and I click the Home button. Then I click the launch icon :

  • On Gingerbread this cause activity A to resume. So if I click on the back button I exist from the app.
  • On ICS this cause a new activity A to be created. So if I click on the back button I come back to the previous activity A, and I have to click again on A to exit.

Here is the manisfest.xml content :

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="10"/>

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />

<supports-screens
    android:smallScreens="true"
    android:normalScreens="true"
    android:largeScreens="true"/>

<application
    android:icon="@drawable/icon"
    android:label="@string/app_name">

    <activity
        android:name=".B"
        android:configChanges="orientation"
        android:screenOrientation="portrait">
    </activity>

    <activity
        android:name=".C"
        android:configChanges="orientation"
        android:screenOrientation="landscape">
    </activity>

    <activity
        android:name=".D"
        android:configChanges="orientation"
        android:screenOrientation="landscape">
    </activity>

    <activity
        android:name=".E"
        android:configChanges="orientation"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="com.perfexpert.intent.ACTIVITY_E" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

    <activity
        android:name=".A"
        android:configChanges="orientation"
        android:screenOrientation="portrait"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application>

And the code used to start activities from the main activity :

startActivityForResult(new Intent(this, B.class), REQUEST_CODE_B);

Why do I have this different behavior on ICS ? How to get the Gingerbread behavior on ICS ?

According to the Android Developers site the expected is the following :

Suppose, for example, that the current task (Task A) has three activities in its stack—two under the current activity. The user presses the Home button, then starts a new application from the application launcher. When the Home screen appears, Task A goes into the background. When the new application starts, the system starts a task for that application (Task B) with its own stack of activities. After interacting with that application, the user returns Home again and selects the application that originally started Task A. Now, Task A comes to the foreground—all three activities in its stack are intact and the activity at the top of the stack resumes.

This is the behavior I get on my Emulator (Gingerbread) but not on my Nexus S (ICS).

Thanks

  • 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-06T21:33:47+00:00Added an answer on June 6, 2026 at 9:33 pm

    I’m going to assume that you started the app initially (the first time) from an IDE (like Eclipse or IntelliJ) or after installing it using the installer (from the market or browser or clicking on APK in file browser). If so, this is a known bug in Android (see http://code.google.com/p/android/issues/detail?id=26658 ). Many people have struggled for days chasing this problem 🙁

    A simple workaround for this problem can be found at http://code.google.com/p/android/issues/detail?id=2373#c21

    To verify this is your problem, don’t start it from the IDE or installer. Simply install the app and then go start it from the list of available applications.

    The bug is there on all devices, on all versions of Android (at least up to ICS, haven’t tested on JellyBean yet). It all works as it should in the emulator, so you cannot use emulator behaviour as an indication of real device behaviour.

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

Sidebar

Related Questions

I have an application that contains a main Activity, which has a very simple
I have an application that contains two Activities with <intent-filter> <action android:name=android.intent.action.MAIN/> <category android:name=android.intent.category.LAUNCHER/>
I have an app which has a main activity that calls other activities on
I have my main application delegate which contains a method that returns an object.
I'm developing an iOS 4 application. I have a main view that contains another
My application's main Activity is a TabActivity and it contains an OptionsMenu. I define
Hi I have an application which after login, loads a main activity which contains
I have three activities in my app: .OpeningScene: An opening activity that contains my
I have an existing C++ win32 console app. This application contains a main program
Our web server is structured as follows /path-to-docdir [Contains main pages] ./app/ [Some application

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.