The Activity Lifecycle in Android - How it works and which callback functions it has

Опубликовано: 28 Сентябрь 2024
на канале: tutorialsEU
2,149
84

In this video, you will learn about the Activity Lifecycle in Android.
🔥NEW 2022 Jetpack Compose Course: https://bit.ly/3nK8eOS

The Activity Lifecycle is basically a bunch of callback functions that are called during the lifecycle of your activity or app. So when the app starts and the activity comes into play, then onCreate is called.
Then onStart and then onResume. At this point your activity is visible and the user can interact with it.
Now let's say the user gets a call, then the Activity gets pushed into the background, at this point onPause() and onStop will be called.
If the user doesn't come back to the application, then onDestroy will be called. That's the ideal moment to make sure, that your app's data is stored for example.

tutorialsEU offers you free video tutorials about programming and development for complete beginners up to experienced programmers.
This includes C#, Unity, Python, Android, Kotlin, Machine Learning, etc.
Stay tuned and subscribe to tutorialsEU: https://goo.gl/rBFh3x

Facebook:   / tutorialseu-109380204093233  
Discord:   / discord  
LinkedIn:   / tutorialseu