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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:34:49+00:00 2026-06-16T14:34:49+00:00

To keep me busy during the holidays, I decided to learn about Android Development.

  • 0

To keep me busy during the holidays, I decided to learn about Android Development.

So I’m following the tutorial about an Activity’s lifecycle. In the linked article, it says:

During normal app use, the foreground activity is sometimes obstructed
by other visual components that cause the activity to pause. For
example, when a semi-transparent activity opens (such as one in the
style of a dialog), the previous activity pauses. As long as the
activity is still partially visible but currently not the activity in
focus, it remains paused.

However, once the activity is fully-obstructed and not visible, it
stops (which is discussed in the next lesson).

I downloaded the sample app. The sample app has 3 activities, each with buttons that launches the other activity from an Intent. When I clicked “Start B”, I expected that Activity A‘s state should be “Stopped” since it is now fully-obstructed with Activity B‘s layout. However, it was set to “Paused”.

The only time that Activity A‘s state turns to Stopped is when I click “Start C” from Activity B‘s layout.

Why is this happening? Is it because of some optimization that is present on newer Android versions or am I misunderstanding the article?

Screenshot

  • 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-16T14:34:50+00:00Added an answer on June 16, 2026 at 2:34 pm

    Here’s something I learned the hard way – Google’s Android docs are not exactly accurate about everything!

    Sometimes, The system optimizes certain behaviors which seem to deviate from the docs. The only way to know exactly how something works is by the hard way – by digging through the source!.

    If your app depends on certain system level behaviors such as stopping and pausing to work exactly in a particular sequence as advertised then you will have a hard time. This behavior is controlled by the system and offers no guarantees.

    The best way I have found to deal with this is to find out the contract that Google promises the developers and stick to it. For example, In this case, the contract says that if you follow the rules, implementing the required lifecycle callbacks when they are needed, then it will work, and you do not need to know exactly under what circumstances onStop(), onSaveInstanceState(), onPause(),onDestroy() etc are called.

    In other words, If you do what is needed to be done when your app is paused by implementing onPause() , Then you don’t need to know exactly when your activity will be paused. The pausing/resuming is controlled by the system and is subject to change from version to version (or maybe even from manufacturer to manufacturer if they choose to customize this behavior).

    Wish someone had told me this when I had started. It would have saved me a lot of time and frustration. Hope this helps.

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

Sidebar

Related Questions

So I keep getting the Application is busy RPC_E_SERVERCALL_RETRYLATER error with the following code.
Keep going around circles, but I am still unclear about this. Have a feeling
I keep getting an error saying that @android:style/Widget.Holo.Light.Button.Borderless is not public and so can't
I am busy creating a system where I need to keep track of every
I started working on Project Euler problems today to keep myself busy over break.
I am considering starting a project so that I can learn more and keep
I keep seeing the phrase duck typing bandied about, and even ran across a
While I've been busy finishing my Google App Engine solution during the last several
Keep running into When using the multi-mapping APIs ensure you set the splitOn param
(Keep in mind this is on OSX Snow Leopard) I don't know how to

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.