Reputation: 3703
when i'm passing bitmap image to other activity i'm getting mag on logcat as-
03-20 12:06:56.553: E/JavaBinder(280): !!! FAILED BINDER TRANSACTION !!!
it's happening for large size image.small size image is working well. what should i do?please help me.thanks in advance.
here i'm passing data as-
Drawable drbl=_imageView.getDrawable();
int imageh=_imageView.getHeight();
int imagew=_imageView.getWidth();
Bitmap bit = ((BitmapDrawable)drbl).getBitmap();
intent.putExtra("Image_Height", imageh);
intent.putExtra("Image_Width", imagew);
intent.putExtra("Bitmap",bit);
startActivityForResult(intent, 2);
Upvotes: 2
Views: 2150
Reputation: 1926
Putting that amount of data in extras is not a good approach. Easiest work around is keep a static reference of the new Bitmap
public static Bitmap getBitmap(Bitmap changeBitmap){
return bitmap;
}
And after using it recyle it i this manner.
if(changedBitmap!=origanlBitmap)
orignalBitmap.recycle();
Upvotes: 2