Since it is very annoyed that one app can be used only after user enter their username and password, we should allow user to use some function without login, such as to see availability statistics. But when using some functions related to account action, such as sharing information, chatting online and so on, it requires user to login. Therefore our app needs a kind of session management, to judge user whether or not has already login.
FYI - if you use Parse (which we will talk about in a future lecture), it is very easy to handle user logins, and also detect if a user is currently logged in (https://parse.com/docs/android/guide#users).
Since it is very annoyed that one app can be used only after user enter their username and password, we should allow user to use some function without login, such as to see availability statistics. But when using some functions related to account action, such as sharing information, chatting online and so on, it requires user to login. Therefore our app needs a kind of session management, to judge user whether or not has already login.