Back to project page AndroIUT.
The source code is released under:
GNU General Public License
If you think the Android project AndroIUT listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.iutdijon.androiut2.global; import com.iutdijon.androiut2.iut.data.account.UserAccount; import com.iutdijon.androiut2.util.PreferencesManager; /*from w w w .j a v a 2 s . c o m*/ /** * Classe permettant un acc?s global ? certaines variables * @author Morgan Funtowicz * */ public class AndroIUTApplication { public static final String PREFS_NAME = "AndroIUT_prefs"; public static final String APP_NAME = "AndroIUT"; private static AndroIUTApplication instance; private static UserAccount userAccount; public AndroIUTApplication() { } public void setUser(UserAccount account){ userAccount = account; PreferencesManager.getInstance().setString(PreferencesManager.REMEMBER_ME_OPTION, account.getLogin()); } public UserAccount getAccount(){ return userAccount; } synchronized public static AndroIUTApplication getInstance(){ if(instance==null){ instance = new AndroIUTApplication(); } return instance; } }