As I’m finishing up on my (simple) application I’m now understanding the life cycle of an activity much better. While it’s not that hard to get right, it is easy to get it wrong :)

The lifecycle of an activity is documented here: http://d.android.com/reference/android/app/Activity.html, along with a nice picture. When testing your app you have to be aware that for example pressing the back button on the device might have a different effect then pressing the home button. To the user it seems the same; the app is no longer visible, but the difference of putting the app in the background (using the home key) or exiting the current activity (using the back key) might be important, depending on what resources your app is managing.

Getting the lifecycle right will make your app a good citizen on the Android platform, which is important for a good user experience.