Fix the position of the open app and longtime variable :)

Sry for very very bad english ^^ Problem 1: So i open app, made some clicks, switch pages and stop. How do I do that the next time run the application, it opens in the same place? So, problem 2: How to keep some variable (id, name, etc.) after close the app? And the next launch the app use this variable to log in?

Both of those cases are managed by storing some local state, for instance by using the storage API or the local user prefs (as exposed by this user project )