transactiontoolargeexception

Replace gallery image with gallery image in android show too large exception

心已入冬 提交于 2021-02-17 06:01:16
问题 java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 51924760 bytes when one image is select from gallery is work but when i am try to update same image with new image from gallery in android it show this error and application crash Solution for this problem is given below // when you pass bitmap through listview adapter to get this in Fragment imageBitMap = getArguments().getParcelable("bitmapImage"); profileImageView.setImageBitmap(imageBitMap); //Add this

Exception when starting activity android.os.TransactionTooLargeException: data parcel size

帅比萌擦擦* 提交于 2019-12-13 09:29:10
问题 Creating intent with a large amount of data in extras public static Intent createIntent(Context context, List<PhotoItem> gallery, int indexOf) { Intent intent = new Intent(context, GalleryViewActivity.class); intent.putExtra(EXTRA_PHOTO_INDEX, indexOf); intent.putExtra(EXTRA_PHOTO_OBJECT, new Gson().toJson(gallery)); return intent; } Then running the activity: startActivity(createIntent(... crashes application with error: Exception when starting activity android.os