1

I know I haven't tried anything well frankly because I don't know why this error occurs but while searching for answers on google,I think it has something to do with parcelable.And parcelable is used when we want to pass objects of custom classes.Well I am using a custom class and passing its object too ,using parceleable

1 So here is the scenario.There are a few fragments(suppose say songsfragment).One of them generates a list of all the songs.I click on any song and a new activity(say it playeractivity) is launched and the song is played in the service.Everything runs fine...

2 I go to the settings kill the app...and wait for some time (i am guessing the android os calls the activity's ondestroy method......is my guess wrong ?)

3 I open the activity from the last opened activites the song starts again(everything is normal till here)....now if i press back button instead of songsfragment,my app crashes with the error i mentioned....So why does this exactly happen???

The app doesn't crash with the same error(please read the point number 2 again)if I don't wait for some time and open the activity instantly.So this gives me a feeling that has it something to do with onSavedInstances???

  • Could you post the stack trace when the app crashes? – Andrew T. Feb 20 '14 at 06:54
  • @AndrewT. if you know why it happens,could you please tell why it happens??there might be a condition right ? if i post my logcat,you will ask for my code,when i post my code usually people say post only the relevant code,and when i post only relevant code,no one replies...so lets keep it simple..please can you tell me why actually this error occurs ??what may be it' cause ? –  Feb 20 '14 at 06:56
  • I don't know why it happened. Even maybe I don't know the answer. Have you tried reading some related questions on the right? If nothing helps, then this problem might be a specific case, and we need the stack trace. – Andrew T. Feb 20 '14 at 07:04
  • did you check this http://stackoverflow.com/questions/1996294/problem-unmarshalling-parcelables – Hardik Feb 20 '14 at 07:16
  • and this also http://stackoverflow.com/questions/13997550/unmarshalling-errors-in-android-app-with-custom-parcelable-classes – Hardik Feb 20 '14 at 07:24

0 Answers0