Time goes by so fast, I was a little bit surprised to see that my last post was one month ago. So let's go..
Sometimes it is neccessary to get notfied if the application is sent to the background or recoveres back to foreground. As I started developing apps on iOS I was used that there is a central mechanism to check wheter the app is created, destroyed, started, stop etc. However in Android this central functionality is missing. So we need to implement a little workaround by implementing a base class every Activity inherits from.
For those who already use API level 14 or higher, the approach proposed by mjbshaw should be prefered unless follow the example shown in the implementation part below.