My MainActivity
has the lauchMode=\"singleTask\"
Now I want to start the activity from a notification with special intent data.
in Ma
onResume()
is always called if the activity is not in the foreground. However, what you're probably seeing is that getIntent()
is returning the intent that started the activity, not the intent that was most recently sent to it.
To fix this, you should override onNewIntent()
. This will receive the new intent sent to it. Then you can call setIntent()
with the received intent, which will cause getIntent()
to return the new intent when used in onResume()
.