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 1
Oldest  Newest  Rating
0 Mohammed Tarek · August 30, 2016
Respect :angel:
0 MD Yousuf Azad Sami · July 15, 2016
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 
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  

Java / Android Development


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

Bucky Roberts Administrator