Reputation: 11
I sent the picture from the camera to the other activity. I'm trying to do it with an intent. But I got an error. How can I resolve FAILED BINDER TRANSACTION error.
Intent intent = new Intent(this, B.class);
byte[] byteBitmap = converttoByte(mNextPageBitmap);
intent.putExtra("bitmap", byteBitmap);
startActivity(intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION));
B.class
if(getIntent().hasExtra("bitmap")) {
byte[] getByte = getIntent().getByteArrayExtra("bitmap");
mBitmap = BitmapFactory.decodeByteArray(getbyte, 0, getbyte.length);
bitmapDrawable = new BitmapDrawable(getResources(), mBitmap); }
Upvotes: 0
Views: 459
Reputation: 93678
Putting a bitmap in a Intent is a bad idea. There's a maximum byte size on an Intent. Write it to a file, and pass the filename in the intent.
Upvotes: 1