Lifecycle helper class for Android apps