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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:45:24+00:00 2026-05-31T16:45:24+00:00

I made an exceedingly simple app consisting of a launch activity (.TestActivity) with nothing

  • 0

I made an exceedingly simple app consisting of a launch activity (.TestActivity) with nothing more than a button on it, and a 2nd activity (.second) with nothing more than a piece of text on it.

Then I create an .apk file from it and sideload it to my phone, I open the app, click the button and go to the 2nd activity, press Home to make the app leave the screen, and then press the icon of the app to open it again, it resumes on my FIRST activity and not the 2nd one that I would expect.

After I force close the app it works properly, though! Where is the problem here? It’s not my phone because I’ve seen this on several other devices that I’ve tested with. It’s not necessarily Eclipse because it works as expected on Eclipse (and the emulator), it’s possibly the manner in which I package the .apk file (but even then it’s a pretty standard “export” that I’m doing from Eclipse so I’m not sure what that would be). Any other ideas?

Here’s the manifest:

  <application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <activity
        android:label="@string/app_name"
        android:name=".TestActivity" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
      <activity
        android:label="@string/app_name"
        android:name=".second" >
         </activity>
</application>

Why would force closing the app make it work how I want it to work the 2nd time, though?

  • 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-31T16:45:25+00:00Added an answer on May 31, 2026 at 4:45 pm

    I just found the following links:

    http://code.google.com/p/android/issues/detail?id=26658

    and a decent workaround here: Home key press behaviour

    I understand what CaseyB is getting at, but I can reproduce this every single time. If my app has a memory leak or ends up getting killed due to inactivity or the need for Android to reclaim some of its resources, that’s one thing. But this seems pretty obviously like a bug to me and I’m just going to have to live with the workaround for now.

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

Sidebar

Related Questions

Made a simple app which using a timer, counts the number of mouse clicks
Made an app targeting API8 and it's running fine on all emulator images all
Made some changes to my Django app's model and used South to migrate them
I made a simple application in which an MDI parent loads a child form
I made this app that takes time entries from fogbugz and posts them to
Made a simple script that hide/show a hidden div. The page automatically adjusts its
I made a simple login form where a user can click on a register
I made a piece of software that makes it possible for me to delete
I made a basic app with 2 buttons, start and stop. When I start
I made a very simple pannel updating wich will query a database and show

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.