I created shared preferences activity, and i have 2 strings saved...
    public class sharedprefs extends Activity {
    EditText email;
    EditText lozinka;
    Button btnEmail;
    Button btnLozinka;
    Button btnPovratak;
    TextView email2; 
    TextView lozinka2;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.sharedpref);
        email2 = (TextView)findViewById(R.id.textView4);
        lozinka2 = (TextView)findViewById(R.id.textView5);
        email = (EditText)findViewById(R.id.editText1);
        lozinka = (EditText)findViewById(R.id.editText2);
        btnEmail = (Button) findViewById(R.id.button1);
        btnLozinka = (Button) findViewById(R.id.button2);
        btnPovratak = (Button) findViewById(R.id.button3);
        LoadPreferences();
        btnEmail.setOnClickListener(new View.OnClickListener() 
        {
            public void onClick(View v) 
            {   
                SavePreferences("EMAIL", email.getText().toString());
                LoadPreferences();  
            }
        });
        btnLozinka.setOnClickListener(new View.OnClickListener() 
        {
            public void onClick(View v) 
            {   
                SavePreferences("LOZINKA", lozinka.getText().toString());
                LoadPreferences();
            }
        });
        btnPovratak.setOnClickListener(new View.OnClickListener() 
        {
            public void onClick(View v) 
            {   
                finish();
            }
        });
    }
    private void SavePreferences(String key, String value){
        SharedPreferences sharedPreferences = getPreferences(MODE_PRIVATE);
        SharedPreferences.Editor editor = sharedPreferences.edit();
        editor.putString(key, value);
        editor.commit();
       }
       private void LoadPreferences(){
        SharedPreferences sharedPreferences = getPreferences(MODE_PRIVATE);
        String stremail = sharedPreferences.getString("EMAIL", "");
        String strlozinka = sharedPreferences.getString("LOZINKA", "");
        email2.setText(stremail);
        lozinka2.setText(strlozinka);
       }
}
I tested it and displayed them with textview... When i exit and re-enter my app, they are still displayed. Now i need this two strings for use with httpClient in my main activity. Problem is, I don't know how to load them in my main activity, and what are things I need to do(declare in main activity) for this to work ??
 
     
     
    