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 3
Oldest  Newest  Rating
0 Waqar Ahmad · August 23, 2015
Check this "Tag" error plz
0 Ashraf Qandeel · August 16, 2015
Thanks alot....
0 nishanth somashekar · July 30, 2015
thanks bucky
0 Asher Can · July 25, 2015
Thank you for sharing all you videos!
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 sandip ghoshal · July 24, 2015
i am having problem with android avd manager i can not open emulator the android virtual device i am new in this this following error i am getting

D:\Users\sandip\AppData\Local\Android\sdk\tools\emulator.exe -netdelay none -netspeed full -avd Nexus_5_API_22
Creating filesystem with parameters:
WARNING: userdata image already in use, changes will not persist!
Size: 69206016
WARNING: cache image already in use, changes will not persist!
Block size: 4096
Blocks per group: 32768
Inodes per group: 4224
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16896
WARNING: SD Card image already in use: D:\Users\sandip\.android\avd\Nexus_5_API_22.avd/sdcard.img
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
emulator: WARNING: Requested RAM size of 512MB is too large for your environment, and is reduced to 384MB.
emulator: device fd:600
HAX is not working and emulator runs in emulation mode
emulator: The memory needed by this AVD exceeds the max specified in your HAXM configuration.
emulator: AVD RAM size = 384 MB
emulator: HAXM max RAM size = 0 MB
emulator: You might want to adjust your AVD RAM size and/or HAXM configuration to run in fast virt mode.
creating window 43 59 329 583
emulator: emulator window was out of view and was recentered
0 Shakun Bhalla · July 23, 2015
Hi,
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 jinu mm · July 7, 2015
Thanks for the Source Code. Just began watching tutorials for   http://www.essayscampus.com  essay writing  
students
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

106,956 followers
About

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

Links
Moderators
Bucky Roberts Administrator