ClassNotFoundException when using custom Parcelable
<p>I use a custom Parcelable to carry some data to a BroadcastReceiver. Here is what i do:</p>

<p>I register my intent and set the extra Parcelable on it along with an extra classloader (intent.setExtraClassLoader(..)). Next i schedule the execution of the broadcast via an AlarmManager.</p>

<p>So when the AlarmManager fires it looks at my intent with its parcel which it can not process since it doesn't use the supplied classloader (as it seams).</p>

<p>I think the classloader gets lost when Inten.fillIn copys the intent to a new one (see stack trace). </p>

<pre><code>02-21 21:09:25.214: WARN/Intent(52): android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.company.project.MyParcelable
02-21 21:09:25.214: WARN/Intent(52):     at android.os.Parcel.readParcelable(Parcel.java:1822)
02-21 21:09:25.214: WARN/Intent(52):     at android.os.Parcel.readValue(Parcel.java:1713)
02-21 21:09:25.214: WARN/Intent(52):     at android.os.Parcel.readMapInternal(Parcel.java:1947)
02-21 21:09:25.214: WARN/Intent(52):     at android.os.Bundle.unparcel(Bundle.java:169)
02-21 21:09:25.214: WARN/Intent(52):     at android.os.Bundle.putAll(Bundle.java:242)
02-21 21:09:25.214: WARN/Intent(52):     at android.content.Intent.fillIn(Intent.java:4530)
02-21 21:09:25.214: WARN/Intent(52):     at com.android.server.am.PendingIntentRecord.send(PendingIntentRecord.java:185)
02-21 21:09:25.214: WARN/Intent(52):     at android.app.PendingIntent.send(PendingIntent.java:400)
02-21 21:09:25.214: WARN/Intent(52):     at com.android.server.AlarmManagerService$AlarmThread.run(AlarmManagerService.java:636)
</code></pre>

<p>So is there any way around that problem? Any help would be appreciated.</p>

<p>Thanks</p>
