What's the difference between onCreate() and onStart()?

Sharad Jaiswal
Sharad Jaiswal

Posted On: Apr 22, 2021

 

The major difference between onCreate() and onStart() is as follows.

onCreate() is called when the Activity is created; that is, it is launched or started. (Additionally, this triggers when the orientation is changed.) It is called again when the process is killed, then returned to.

while onStart() called following onCreate() at startup. Additionally, it is also called when the app is navigated back to after onStop() (and following onRestart()), which occurs after the Activity is no longer visible (which is during the time that "the user can see the activity on-screen, though it may not be in the foreground and interacting with the user").

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Android Interview Questions

    What is Android?

    Android is an open-sourced operating system by Linux that is primarily used in mobile devices like cell phones and tabl..

    Android Interview Questions

    What are the Android application components?

    Android application components are the building block essentially used in the Android application. The application mani..

    Android Interview Questions

    What does Fragment mean?

    A fragment means behavior or the portion of user interface in a Fragment Activity. One can combine multiple fragments i..