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
0 imam afry · November 18, 2016
thanks
0 Parimey Patil · November 13, 2016
Hi bucky, When I am trying to run this app on my emulator it is saying that "Unfortunately My Application has stopped" every time. What should  I do?  Pls tell me quickly.
 
0 Amit Dixit · November 1, 2016
Sir i have errors while performing these code.. please help..!!!/images/forum/upload/2016-11-01/3379f65e293422328e9b12a490b722c9.png
0 Mohammed Tarek · August 30, 2016
Respect :angel:
0 MD Yousuf Azad Sami · July 15, 2016
Awesome! 
0 Ashwin Athrey · June 19, 2016
I get "Unfortunately myapp has stopped" when i try to run the app on the emulator. What do i do?
0 Yang Xu · June 15, 2016
love your tutorial!
0 nathan abraham · May 17, 2016
How do you find the source codes for all the videos I can't find the on this website plz help
0 Daniyar Iman-Zhussip · March 18, 2016
nice man
0 Akshay Pimpalkar · February 3, 2016
i found these question marks on ur code. What does it mean?/images/forum/upload/2016-02-03/0ece4ed455921192ec6688b6269e2896.png 

Java / Android Development

107,168 followers
About

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

Links
Moderators
Bucky Roberts Administrator