added an appstate listener in viewbundle to display viewscreen
split the handling of different states to a specific object