I am trying to get Image from Gallery in fragment. Following is the line of code I am using to get Image from Gallery.
Intent intent1 = new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
getActivity().startActivityForResult(intent1, 1);
I am getting this particular crash in only nougat device and the same piece of code is working fine for other android version. Following is the error that I am getting in nougat
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1314264 bytes
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3850)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6342)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
Kindly please someone help me out with this issue.