you can use SharedPreferences As A session variable
To creating a session you can use
SharedPreferences pref = getApplicationContext().getSharedPreferences("Session Data", MODE_PRIVATE);
Editor editor = pref.edit();
editor.putString(KEY_USERNAME,username);
editor.putString(KEY_PASSWORD,password);
editor.commit();
To Remove From Session You Can Use
SharedPreferences sp=getSharedPreferences("Session Data",0);
SharedPreferences.Editor ed=sp.edit();
ed.remove("username");
ed.remove("password");
ed.commit();
And If You Want to fetch values from shared preferences than use something like this
SharedPreferences sp;
myContext=this;
sp=myContext.getSharedPreferences("Session Data",myContext.MODE_PRIVATE);
username=sp.getString("username","");
password=sp.getString("password","");