Added activity lifecycle listener