I am still new to android app development.
I have a table in QSLite database that gives me key parameters about each user. A typical table is attached as image below;
When a user logs into the application, i would like to set certain constants that i can use throughout the entire application. For example, if a user with UserID = 3 in the above table logs in, i want to get hold of this UserID (CurrentUserID). I would then use that ID to check from anywhere in the app activity whether he is from Location 2, or which DataSourceID he coming from. The result will determine which type of activity or permissions i should display/give to the user.
In Access, we used global variables. However, from what i read in java, the use of public static variables (equivalent) is not recommended.
Could you point me to some examples of how challenges like this are solved in Java?