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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:47:12+00:00 2026-05-13T23:47:12+00:00

Does switching activities in Android start a fresh JVM? It seems like each activity

  • 0

Does switching activities in Android start a fresh JVM? It seems like each activity is meant to run as its own “main” method. If I have a singleton (via Guice, not an actual singleton in this case) should I expect to be re-creating it every time I switch activities?

  • 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-13T23:47:12+00:00Added an answer on May 13, 2026 at 11:47 pm

    What I know about Android and programming in general is entirely hacked-together and not formally taught so perhaps other people will need to correct me, but that said, I don’t think Android starts new virtual machines all the time. I’ve read that it uses the Dalvik VM rather than the standard JVM. I couldn’t tell you what exactly that entails though. However switching activities is meant to be a lightweight operation as an application can easily have several of them. If it had to recreate the Dalvik VM each time, that wouldn’t seem to make sense, particularly as Activities can easily pass information between each other, call each other’s methods, etc. You can even have one activity start entirely separate applications/tasks while still allowing some communication between them, so again I don’t think it would have to start another Dalvik VM in that situation either.

    Judging from your other question about why we’d want to have multiple activities I’m assuming you’re new to Android; have you had a good read through its documentation, such as the fundamentals, particularly the activity lifecycle? Sometimes the information is a bit sparse, and often they assume the reader understands Java already, but that shouldn’t be an issue for you.

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

Sidebar

Related Questions

Does anyone of you have any experience with switching from SQL Server 2008 to
Does Mono support XAML? Specifically I'm thinking of switching to using XAML for new
More specifically, does the performance degradation of context switching apply to threads that are
I use i18n for localization like django does using a custom request handler for
Why does switching on anti-aliasing interfere with my dashed pen? (source: googlepages.com )
How does fast user switching affect a windows service? Are the services suspended or
Does anyone have any good techniques for easily switching between development and live builds
Even when Visual Studio 2010 does not run tests in multiple parallel threads, it
So I have this ActivityGroup in which I show 2 Activities. When I'm switching
Sometimes when switching branches using Git (version 1.7.2.1) it does not seem to remove

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.