I'm still working on my app, and I have a new issue. On my WarikeActivity I have a button, this button send me to a MapActivity and then I want to get back to my WarikeActivy with some values from the MapActivity, I tried this:
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
savedInstanceState.putByteArray("byte_warike", byteArray);
super.onSaveInstanceState(savedInstanceState);
}
And then of course
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
byteArray = savedInstanceState.getByteArray("byte_warike");
foto = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
imgFoto.setImageBitmap(foto);
}
But the app crash because byte_array is always null. Any idea about how to solve it? I was reading others posts by I cant solve that problem yet.
Thanks in advance.