I would like to pass Bitmap or Drawable from one Activity to another, now i'm doing this:
EventPhoto photo = (EventPhoto) parent.getItemAtPosition(position);
BitmapDrawable test = (BitmapDrawable) photo.getDrawable();
Bitmap bitmap = test.getBitmap();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 0, baos);
byte[] b = baos.toByteArray();
Intent intent = new Intent(EventDetailActivity.this, ImageExpandActivity.class);
System.out.println(b.length); //B LENGTH = 908k
intent.putExtra("image",b);
startActivity(intent);
My problem is when i try to use putExtra, he don't send any exception, nothing, but don't respond and Android kill application, why this is happen? I'm thinking its about size because everything works when i pass a little image.
I'm looking for and find few solutions like this: How to pass bitmap from one activity to another but i want to use putExtra, any ideas?
Thanks