Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android.os.BadParcelableException when getting extra from Intent #143

Open
pedro-otero opened this issue Dec 19, 2016 · 1 comment
Open

Comments

@pedro-otero
Copy link

I'm getting android.os.BadParcelableException: ClassNotFoundException when unmarshalling: kaaes.spotify.webapi.android.models.TrackSimple when trying to get an extra from a intent to start activity.

To reproduce this I put a saved album in an intent to start an activity:

@Override
public void showAlbum(SavedAlbum savedAlbum) {
    Intent albumActivityIntent = new Intent(this, AlbumActivity.class);
    albumActivityIntent.putExtra("album", savedAlbum);
    startActivity(albumActivityIntent);
}

The problem arises when trying to get this stored saved album in the activity meant to display it:

SavedAlbum album = intent.getParcelableExtra("album");

Please note the exception is about TrackSimple, not SavedAlbum.

@Chuckytuh
Copy link

Chuckytuh commented Feb 11, 2017

Bump, same happens for kaaes.spotify.webapi.android.models.PlaylistTrack but in my case I'm saving it on onSaveInstanceState and later loading it from the onCreate bundle and what I am saving is an instance of Playlist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants