Different States of an Android Activity

+156 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 android learner · June 29, 2015
I'm getting error: class, interface or enum expected. What to do?
0 jinu mm · July 7, 2015
Thanks for the Source Code. Just began watching tutorials for   http://www.essayscampus.com  essay writing  
0 Osama Bin Zafar · December 22, 2016
hi there!!
              Can any one tell me where can i find all the source codes, 
i am following android tutorials by bucky , the 87 Video tutorial series ..
thanks in advance 
0 Lasith Niroshan · April 9, 2015
Thanks for codings...:)
0 Shakun Bhalla · July 23, 2015
I also copied the code that you wrote above but the problem that i am facing is that it shows an error in the "TAG", it says that it has a private access in android.support.v4.app.FragmentActivity.

Kindly help me that as i am stuck with this and am not able to proceed further.

Thank you
0 Daniyar Iman-Zhussip · March 18, 2016
nice man
0 Ankit Agarwal · April 23, 2017
Hi Bucky,

I have recently started to go through your tutorials on the youtube channel. I have already completed the first 9 tutorials and I am now on 8th where we are talking about logs. well I have running all the changes in the AVD and everything was working fine. but now when I embedded changes for logs, I came to notice there are logs being printed even though the app is showing on the AVD manager.

Can you help me on this?/images/forum/upload/2017-02-28/45881698cd796b14a4b2c21a9773c41f.png
0 ANIL TÜFEKÇİ · April 23, 2017
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.
0 Hossein Mansouri · October 4, 2015
please fix code view problem in Google Chrome

Java / Android Development


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

Bucky Roberts Administrator