added app lifecycle code to emoba