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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:22:05+00:00 2026-06-05T01:22:05+00:00

I have 2 applications A and B. Both have only one activity. Application A

  • 0

I have 2 applications A and B. Both have only one activity.
Application A starts application B.
When I close activity in B – I return to A.
How to keep application B in memory? If I close activity in B with finish() – B remains im memory. Does this means that next time Android will use it or start another instance?

UPDATE

If application B have single task or single activity set in manifest?
Or may be behaviour of B will depend on intent from A?

  • 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-05T01:22:06+00:00Added an answer on June 5, 2026 at 1:22 am

    When you ask “How to keep application B in memory?”, what exactly do you mean?

    If you are really talking about 2 separate applications, then Android will start each application in a separate process. Each process has its own Virtual Machine. If an activity in application A starts an activity in application B then you will have 2 running processes. Once the activity in B calls finish(), it is done. At some time later Android will call onDestroy() on the activity in B and then at some time later Android will kill the process that B is running in. Android will kill off the process when it needs the memory, or whenever it decides that it wants to, based on whatever internal criteria it uses for killing processes.

    Once the user has returned to application A from application B, if the user again starts an activity in application B Android will create a new instance of that activity in the process where application B is running. If the process has already been killed by Android, then Android will create a new process for application B and then create a new instance of the activity within that process.

    Once an activity has called finish() it will never be reused. It is done. It is dead. It is ready for destruction and garbage collection. It makes no difference what launchMode you set for the activity or what flags are set in the Intent.

    I hope this answers your question(s).

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

Sidebar

Related Questions

I have one Windows application and an AIR (Adobe) application. Both the applications are
I'm writing my first Android application and I have one activity that I'd like
I have two applications. In one application the web browser control shows a flash
In my application there are two class one is InternetActivity which only extends Activity
I currently have a single solution that contains both the one application developed so
I have two separate applications (both part of the same system) that share a
I have two applications: c++ service and a RoR web server (they are both
I have two web applications in the same solution. They both use different membership/profile
I have an Ember application with both a view and a controller: http://jsfiddle.net/gavriguy/EDr4G/ I
We have an application written in both C++ and .NET that installs for all

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.