0
How can I pass an image of an Activity to another actiivity?
I have an image on my settings screen, I want to send it to my main screen.
I saved it in my sharedPreferences and would like to use the key on my other screen, just like I do with texts.
Activity where I am saving the data (editor.putString("image", photo);)
public void salvarDados(){
String usrname = edtEmailSettings.getText().toString();
String name = edtNameField.getText().toString();
String phone = edtPhoneField.getText().toString();
String company = edtCompanySettings.getText().toString();
String photo = imgProfileImage.toString();
if(!savelogincheckbox.isChecked()){
editor.putBoolean("savelogin",true);
editor.putString("user",usrname);
editor.putString("nam", name);
editor.putString("phon", phone);
editor.putString("company", company);
editor.putString("image", photo);
editor.commit();
}
}
Now I don’t know how I’ll get the key ("image") in the other Activity, I can pick up texts and send a setText().
How to do this with image?