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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:17:07+00:00 2026-05-28T05:17:07+00:00

suppose that you have two activities A(which is the main activity) and B when

  • 0

suppose that you have two activities A(which is the main activity) and B

when you initially start the application the onCreate of A is being called since that’s the main activity

now from A you can go again to B

if you go to B then onCreate of B will be called

if you go back to A what will be called? again onCreate or something else?

now suppose that I want to start a service that will update an arraylist every 10 seconds. The values of this arraylist will be shown in the B activity.

So I will probably start this service in the onCreate of A activity. When the onCreate of A is being called, the service starts doing its job

now, then if I want to view the contents of the arraylist, I will go to the B activity. In the B activity initially the onCreate function will be called, so I can just show the values of the arraylist in this onCreate function, but if I leave this activity, and go to A, and then again back to B, will onCreate be called so that the NEW values of the arraylist will be displayed correctly and not the old ones?

thanks in advance

  • 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-28T05:17:08+00:00Added an answer on May 28, 2026 at 5:17 am

    If you return to Activity A from Activity B, the onRestart or onResume method will be called. Take a look at the Activity Lifecycle.

    the activity lifecycle

    Anytime you navigate from an Activity and then return to it, it does not call onCreate again.

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

Sidebar

Related Questions

Suppose that I have two objects with the same property name that I am
Suppose I have two classes that both contain a static variable, XmlTag. The second
Suppose I have two tables that are linked (one has a foreign key to
Suppose I have two documents that are identical except the lines are shuffled. Is
Suppose I have two lists that holds the list of source file names and
Suppose I have two columns in a table that represents a graph, the first
Suppose i have one folder and inside that another two files are there .
I have two activities or screens. The second activity has an AlertDialogBox with radiobuttons
Suppose that I have two numpy arrays of the form x = [[1,2] [2,4]
Suppose that I have two data types Foo and Bar. Foo has fields x

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.