I use a custom Parcelable to carry some data to a BroadcastReceiver. Here is what i do:
I register my intent and set the extra Parcelable on it along with an extra c
Seems that you face with the issue described here: https://code.google.com/p/android/issues/detail?id=6822
There is a workaround described in one of comments under that link: put your custom Parcelable
into an additional Bundle
. Due to the fact that Bundle
internals are not touched until it's needed, such an Intent
can be delivered to your app, since nobody will try to unmarshal your class outside your app.
Bundle hackBundle = new Bundle();
hackBundle.put("key", myParcelable);
intent.putExtra("bundleKey", hackBundle);