Android Tech

The more we share, the more we get

Life cirlce between activities


Here is the simple example to describe the life circle between activities.

This example has 2 activities:

+ AndroidAppLifeCircleActivity

+ GoogleMapLib

When we start the application from menu application in HOME screen or run from IDE, the workflow as follow:

GoogleMapDemoActivity: onCreate
GoogleMapDemoActivity: onStart
GoogleMapDemoActivity: onResume

==================================

When we press Generate button to view the map, they will be:

GoogleMapDemoActivity: onPause
GoogleMapLib: onCreate
GoogleMapLib: onStart
GoogleMapLib: onResume
GoogleMapDemoActivity: onStop

==================================

When we press Back button from menu, it is:

GoogleMapLib: onPause
GoogleMapDemoActivity: onStart
GoogleMapDemoActivity: onResume
GoogleMapLib: onStop
GoogleMapLib: onDestroy

==================================

When we press Back button from menu to return the HOME screen:

GoogleMapDemoActivity: onPause
GoogleMapDemoActivity: onStop
GoogleMapDemoActivity: onDestroy

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: