Question

I'm using Parcelable interface and its working fine till Android 4.3 (Jelly Bean) but when I install same app on a device running under Android 4.4+ (Kitkat) then its crashing while reading from parcel. Its throwing below error :

 java.lang.RuntimeException: Parcel android.os.Parcel@42acce90: Unmarshalling unknown type code 6881383 at offset 1864

When try to read :

getIntent().getExtras().getString("TYPE").contains("SOME_TYPE");

I have put extra in intent like this :

 Intent oIntent = new Intent(getActivity().getApplicationContext(), EventFragment.class);
 oIntent.putExtra("TYPE", "SOME_TYPE");
Was it helpful?

Solution

After a long time and much R&D, I came to know that we should not use ArrayList inside another ArrayList, within a Parcelable object. It is causing the issue.

So I end-up with using Serializable interface provided by JAVA, as both concept are same.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top