I\'m developing android applications for a while, and followed a lot of posts about activity life cycle, and application\'s life cycle.
I know Activity.finish
calling finish in onCreate() will not call onDestroy() directly as @prakash said. The finish()
operation will not even begin until you return control to Android.
Calling finish() in onCreate(): onCreate() -> onStart() -> onResume(). If user exit the app will call -> onPause() -> onStop() -> onDestroy()
Calling finish() in onStart() : onCreate() -> onStart() -> onStop() -> onDestroy()
Calling finish() in onResume(): onCreate() -> onStart() -> onResume() -> onPause() -> onStop() -> onDestroy()
For further reference check look at this oncreate continuous after finish & about finish()