Different States of an Android Activity

+122 Bucky Roberts · December 19, 2014

   protected void onStart() {
       Log.i(TAG, "onStart");

   protected void onResume() {
       Log.i(TAG, "onResume");

   protected void onPause() {
       Log.i(TAG, "onPause");

   protected void onStop() {
       Log.i(TAG, "onStop");

   protected void onRestart() {
       Log.i(TAG, "onRestart");

   protected void onDestroy() {
       Log.i(TAG, "onDestroy");

   protected void onSaveInstanceState(Bundle outState) {
       Log.i(TAG, "onSaveInstanceState");

   protected void onRestoreInstanceState(Bundle savedInstanceState) {
       Log.i(TAG, "onRestoreInstanceState");

Post a Reply


- page 4
Oldest  Newest  Rating
0 Lasith Niroshan · April 9, 2015
Thanks for codings...:)
+2 Shreyans Mulkutkar · March 18, 2015
I added Log messages to my source code, but don't know why its not throwing onCreate, onStart, etc. messages when my App comes up on my emulater. Even added the log message filter. Still not seeing it. 
Can someone point out what is that thing I'm doing wrong?
Thanks in advance.
+1 Kenny Dexter · March 17, 2015
WOw......and What a Wow


your tutorials are dope , i'm just speechless!:sick:
+5 Carl Barlow · March 1, 2015
onDasher(), onDancer(), ...
Took me a while to find this post with the source code, but otherwise I'm loving this video series!
0 Sharad Gupta · February 22, 2015
Thanks for the Source Code. Just began watching tutorials. They are awesome :) !!
0 Samiul Masuk · February 10, 2015
0 Troy Jones · December 19, 2014
I seen this on the developers site.  I believe it mentioned something about only needing to use onStop(), onStart() and onDestroy() as the other one's the activity automatically cycles through.
+2 jan burg · December 19, 2014
Thanks man, this is pretty useful. Is this some foreshadowing of some new android/java development tutorials to look forward to? :)

Java / Android Development


Very popular language used to create desktop applications, website applets, and Android apps.

Bucky Roberts Administrator