At the beginning Activity is launched by an Intent and something is done with this Intent.
When I change orientation of my Activity, it\'s reloaded again and Intent is
Do not use setIntent(null)
. It seems that while it may work sometimes, under some conditions the original intent may come back.
Instead, call setIntent()
with a simple intent that doesn't have an action, data or extras, such as new Intent(Context, Class)
.
Indeed, the use of setIntent()
was actually not a good API design decision in the first place. Instead, as dcg noted, be sure you only check your intent the first time, when your savedInstanceState
is still null.