Reputation: 10609
I need to put a bitmap into an intent extra:
Intent intent = new Intent(this.getActivity(), CropActivity.class);
intent.putExtra(Globals.KEY_IMAGE, this.imageBitmap);
Unfortunately I get the following error:
E/JavaBinder﹕ !!! FAILED BINDER TRANSACTION !!!
I guess it is because the size of an extra is limited to 1mb. How else could i get that bitmap from one activity to another?
Upvotes: 1
Views: 270
Reputation: 1007369
Either:
Don't use multiple activities here, but instead use one activity, perhaps with multiple fragments, or
Carefully pass the Bitmap
via a static
data member, making sure to set that data member to null
after the new activity has the Bitmap
, to prevent a major memory leak
Upvotes: 3