Different States of an Android Activity

+155 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 3
Oldest  Newest  Rating
0 Direndra Subba · January 14, 2016
???protected void onStart() {
???????Log.i(TAG, "onStart");

Why i get this (?) symbol in the code? 
0 Jeroen van der Schalie · January 7, 2016
Because I have a AMD processor and not a intel. I can't use HAXM and therefore also not the Android Virtual Device. I'm using genymotion instead. Which works great regarding the emulation. But when I try to use the android device monitor it does not show the oncreate, onstart, etc.. It does show all other activities, but not those logs. Anybody have an idea why? And better yet a solution to do make it work?

Greetz Jeroen
0 Enana Alrafidain · December 24, 2015
when i copied the codes (onStarts,onResume,....ect) it appears in the red color and when i tried to put it by my self from the  override methods the i have only 4 choices on the override methods list how can i install all of them  
0 Onye Ashikodi · November 10, 2015
Hello Bucky, Thanks for this tutorial and all. Before watching this, Android studio always appear overwhelming. You must have put a lot of effort making this video. But for crying out loud- Why! Why!! Why do you belch to the mic, it's pretty disrespectful.  
0 Hossein Mansouri · October 4, 2015
please fix code view problem in Google Chrome
0 Rogy Joseph · September 15, 2015
Thank you Bucky for the fantastic explanation.
0 Lester Rodriguez · August 29, 2015
You're awesome!
Pretty sweet.
Just having fun with your tutorials
and learning as well.
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 :) :)

0 taha almasri · August 25, 2015
can u help me please :(
0 Waqar Ahmad · August 23, 2015
Bucky bro checkout Tag error. Reply soon

Java / Android Development


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

Bucky Roberts Administrator