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???