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 W3Make Forum 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 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.

Sign InSign Up

Forum By W3make

Forum By W3make Logo Forum By W3make Logo

Forum By W3make Navigation

  • Home
  • About Us
  • Blog
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Questions Feed
  • Blog
  • Contact Us
Home/ Questions/Q 10081
Next
In Process
vidushee singh
  • 0
vidushee singhBegginer
Asked: June 21, 20232023-06-21T22:27:09+05:30 2023-06-21T22:27:09+05:30In: Android Development

life cycle methods of android activity

  • 0

What are the life cycle methods of android activity ? elaborate

  • 1 1 Answer
  • 31 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Kashish2102 Begginer
    2023-06-21T23:24:42+05:30Added an answer on June 21, 2023 at 11:24 pm

    The ongoing screen visible to the user using any app is termed technically an “Activity”. It represents a single screen of the app that the user is using, in such a way there are many screens just in one app which means there are numerous activities listed. Now to manage such activities we have a life cycle called the activity life cycle, which simply explains to us the process from starting and destroying phase.
    –> The activity in the foreground of the screen, visible to the user means it’s at the top of the stack and it is called running or the latest activity.

    –> Now in 2nd scenario suppose multi-activity is seen or one can say, a transparent activity has focused on top, this doesn’t mean that the priority of the previous activity is gone. Now both activities are alive to be noted.

    –> Suppose an activity is completely hidden because of another activity, such as retaining the information, they are on the pause state and are not yet killed, but anytime they are likely to, be as soon as the system needs memory for some other activity which has higher priority.

    –> In the end it’s all about the system destroying the activity from the memory, by either completely deleting or making the ongoing activity finish completely, and the activity can then restart the whole thing again to restore to its previous state.

    so to check whether the system has destroyed or made the activity finish user can check it by the isFinishing() method can be called.

    There are 7 methods as we say to have their individual significance in the life cycle:

    1. onCreate()
      all static work is done here, eg binding the data or creating the views.
    2. onStart()
      Invoked when the activity is visible or the screen of the following app is visible to the user. It is the stage when the activity is first started.
    3. onRestart()
      When the activity is stopped and revived from the background this method is invoked and it is then followed by the OnStart() method always.
    4. onResume()
      As the word describes, resume means to start something that has been stopped for a while or kept the screen at halt, followed by onPause.
    5. onPause()
      This is when the activity goes in the background or is stopped but not yet killed(this is important to remember), heavy processing should not be done in this part. Simply explained as, when the activity is launched in front of other activity, this method is invoked and the activity in bg is kept in pause.
    6. onStop()
      Followed by onRestart(), when the activity is revoked from the background and followed by onDestroy() when the activity is closed or finished.
    7. onDestroy()
      This is invoked when the activity is finished or the system itself is destroying it to acquire some space in the memory.

    This was all about the LIFE CYCLE of the Activity in Android development.
    Hope this answer is helpful for you and that, all that you needed to understand about this topic is relevant from my side.

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

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 3k
  • Answers 2k
  • Best Answers 34
  • Users 5k
  • Popular
  • Answers
  • Mohammed aleem hasan

    What programming language is used for Android development?

    • 65 Answers
  • Manichandana

    Is this mandatory to write css code in making a ...

    • 58 Answers
  • vishakha_1713

    How to decide whether to use DELETE statement or DROP ...

    • 46 Answers
  • Jova0731
    Jova0731 added an answer If you're new to buying a custom sex doll, you… July 31, 2025 at 8:41 am
  • Jova0731
    Jova0731 added an answer Some of us with dark hearts want to design other… July 5, 2025 at 1:56 pm
  • Dewey
    Dewey added an answer In a world where loneliness is rising, torso sex dolls… April 22, 2025 at 6:44 am

Related Questions

  • jean8

    u4gm Diablo 4 Season 10 Rogue Build for Efficient Farming

    • 0 Answers
  • Anonymous

    The Art of Escalation: How to Survive and Thrive in ...

    • 0 Answers
  • Rozemondbell

    Mmoexp Call of Duty Black Ops 6 Bot Lobbies: What ...

    • 0 Answers

Top Members

saningh

saningh

  • 5 Questions
  • 116 Points
Pundit
Vishnu M

Vishnu M

  • 2 Questions
  • 96 Points
Teacher
akshatt25

akshatt25

  • 12 Questions
  • 68 Points
Teacher

Trending Tags

#css #html #questions 3d printing ai android android development android studio answer api app development c++ coding data Database developer development error flutter hacking help ios java javascript kotlin machine learning ml performance php plugin plugins poll programming python question security seo social media sql technology theme web web development website WordPress word press wordpress development wordpressdevelopment wordpress error wordpress errors

Explore

  • Recent Questions
  • Most Answered
  • Answers
  • Most Visited
  • Most Voted
  • No Answers
  • Feed
  • Favorites Questions

Footer

W3make forum is a social questions & Answers platform which will help you establis your community and connect with other people.

Legal Stuff

  • Privacy Policy
  • Terms and Conditions

Help

  • Questions Feed
  • Blog
  • Contact Us

Follow

© 2023 W3make.com | All Rights Reserved.

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.