Different States of an Android Activity

+126 Bucky Roberts · December 19, 2014
/images/forum/upload/2014-12-19/5a00eeefae97a8d127f621fdc5ad2ff7.png


   @Override
   protected void onStart() {
       super.onStart();
       Log.i(TAG, "onStart");
   }


   @Override
   protected void onResume() {
       super.onResume();
       Log.i(TAG, "onResume");
   }


   @Override
   protected void onPause() {
       super.onPause();
       Log.i(TAG, "onPause");
   }


   @Override
   protected void onStop() {
       super.onStop();
       Log.i(TAG, "onStop");
   }


   @Override
   protected void onRestart() {
       super.onRestart();
       Log.i(TAG, "onRestart");
   }


   @Override
   protected void onDestroy() {
       super.onDestroy();
       Log.i(TAG, "onDestroy");
   }


   @Override
   protected void onSaveInstanceState(Bundle outState) {
       super.onSaveInstanceState(outState);
       Log.i(TAG, "onSaveInstanceState");
   }


   @Override
   protected void onRestoreInstanceState(Bundle savedInstanceState) {
       super.onRestoreInstanceState(savedInstanceState);
       Log.i(TAG, "onRestoreInstanceState");
   }

Post a Reply

Replies

- page 1
Oldest  Newest  Rating
+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!
+3 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? :)
+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

onBucky()

your tutorials are dope , i'm just speechless!:sick:
0 rami Issa · July 24, 2015
Hi Bucky!

In the first video you talk about " the life of an app" and you explaine and show how to create logs for what is happening and then you show how to create a filter. 

When i try to run the app i get this error message and have no idea of what to do, thankful for all help that i can get

Best regards


/images/forum/upload/2015-07-24/81db7ddd81b19cd83159a6c758e01456.jpg
0 Samiul Masuk · February 10, 2015
:)
0 shabreesh menon · August 25, 2015
Hello Guys Check out First APP I have created using GridLayout. The App is called Calculator. Check it out guys and let me know if there is any improvmements to be made :) :)

/images/forum/upload/2015-08-25/e424f481d53e8ae408e8695748edfa37.PNG
0 Asher Can · July 25, 2015
Thank you for sharing all you videos!
0 Colder Coder · July 5, 2015
Hi, thanks for this. I find this thread through the android tutorial, which helps a lot.
0 Colder Coder · July 5, 2015
one question, why cannot I see the onDestroy log when the app is removed through the "square" button.

Java / Android Development

107,147 followers
About

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

Links
Moderators
Bucky Roberts Administrator