Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Google Play Services Interacting with Your API Display Loading and Error States

David Axelrod
David Axelrod
36,073 Points

What is an outstate bundle?

why is he putting the parcleable in it as well?

thanks!

1 Answer

I hate to do this because the post is so old, but I can easily see another person asking this same question, so I'm going to answer it for that potential future coder.

When the instance state is saved, meaning, your app calls onSaveInstanceState() because another app came to the foreground or something similar, that method takes a Bundle object which contains the current state of the app to save. Any information you want to make sure is saved temporarily can be put into that Bundle in a Parcelable form. The Bundle parameter taken by onSaveInstanceState() is called outstate because it's the state going out (being saved, not read).

David Axelrod
David Axelrod
36,073 Points

Wow!! No idea how you found this but thank you!! It will definitely help future coders.