@@ -0,0 +1,2134 @@
+package tr.edu.boun.cmpe.sculture;%0A%0Aimport android.app.Application;%0Aimport android.content.SharedPreferences;%0Aimport android.widget.Toast;%0A%0Aimport com.parse.LogInCallback;%0Aimport com.parse.Parse;%0Aimport com.parse.ParseException;%0Aimport com.parse.ParseUser;%0A%0A%0Apublic class BaseApplication extends Application %7B%0A    public static final String APPLICATION_ID = %22yJboQpdSMbOBNsvjN3KU43SWvsFIDGhyYP1QZVP4%22;%0A    public static final String CLIENT_KEY = %22PgmbRhX43WhrlNxgvlImrHbmTIMSvccG5FHeLC03%22;%0A%0A    public static final String PREFS_NAME = %22MyPrefsFile%22;%0A    public static final String PREF_PASSWORD = %22password%22;%0A    public static final String PREF_USERNAME= %22username%22;%0A    @Override%0A    public void onCreate() %7B%0A        super.onCreate();%0A        Parse.enableLocalDatastore(this);%0A        Parse.initialize(this, APPLICATION_ID, CLIENT_KEY);%0A%0A        autoLogin();%0A    %7D%0A%0A    private void autoLogin() %7B%0A        if (ParseUser.getCurrentUser() == null) %7B%0A            SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);%0A            final String username = settings.getString(PREF_USERNAME, %22%22);%0A            String password = settings.getString(PREF_PASSWORD, %22%22);%0A            if (username.equals(%22%22) %7C%7C password.equals(%22%22))%0A                Toast.makeText(getApplicationContext(), getString(R.string.loginAdvice), Toast.LENGTH_LONG).show();%0A            else %7B%0A                ParseUser.logInInBackground(username, password, new LogInCallback() %7B%0A                    @Override%0A                    public void done(ParseUser user, ParseException e) %7B%0A                        if (e == null)%0A                        Toast.makeText(getApplicationContext(), getString(R.string.userLogin) + username, Toast.LENGTH_SHORT).show();%0A                    else%0A                            Toast.makeText(getApplicationContext(), getString(R.string.error_login), Toast.LENGTH_LONG).show();%0A                    %7D%0A                %7D);%0A            %7D%0A%0A        %7D%0A        else %7B%0A            Toast.makeText(getApplicationContext(), getString(R.string.userLogin) + ParseUser.getCurrentUser().getUsername(), Toast.LENGTH_SHORT).show();%0A        %7D%0A    %7D%0A%7D%0A

Fix the login/register flows.