On Mon, Sep 26, 2011 at 8:40 PM, TreKing <treking...@gmail.com> wrote:
> On Mon, Sep 26, 2011 at 1:12 PM, John Goche <johngoch...@googlemail.com>wrote: > >> I don't see where the problem is with my code. I am hoping that someone >> here can shed some light on this issue. > > > Ah, I remember this issue. Short answer: Parcelable sucks. I'm fuzzy on the > details, but what I learned the hard way was this: if you use a custom > Parcelable, your process must be "around" for the system to find the class > loader to properly load that type. If your process is not "around", like > when you schedule an alarm for the future and your process has died, > attempting to load your custom class fails miserably as you see. > Thanks TreKing, However I still cannot understand what is going wrong since I am getting this error message while the alarm sets off and my application is still in the foreground so I am not sure the problem has been pinned down yet. > Google "parcelable ClassNotFoundException" for more information. > > What I've done is create a "Bundleable" interface that basically does what > Parcelable is intended to do. Objects extending this interface can put > themselves and recreate themselves from a Bundle object, which is itself > Parcelable so you can send it around just like your object - except with the > minor fact that the system always knows how to load a Bundle type so you > don't run into this error. > Hmmm... Not sure I follow. Could you please give some more details? Thanks, John Goche -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en