Add App events logic and send onPageShown

TODO: send onAppForeground/Background events