Jim
Jim

Reputation: 4405

Using the original Intent when activity is recreated

During the activity lifecycle, when an activity is recreated besides using the onSaveInstanceState to save the state and restore it, we can use the values set in the extras of the original Intent that started the activity.
Are there any pitfalls doing this though? The documentation does not go into much detail on this

Upvotes: 0

Views: 102

Answers (1)

David Wasser
David Wasser

Reputation: 95578

The original Intent is always available. When the Activity is recreated, onCreate() will always be called with the original Intent that launched the Activity and the original "extras" will always be there.

Upvotes: 1

Related Questions