Obsolete
Status Update
Comments
sf...@gmail.com <sf...@gmail.com> #2
I have the same issue
to...@gmail.com <to...@gmail.com> #3
Interesting I tested it with Android 2.3.7. I mean your example project. And it always wrote onNewIntent() to the log.
gi...@gmail.com <gi...@gmail.com> #4
i have the same problem with a searchable activity. When i start a search the activity is called with flag new_task instead of single top
da...@googlemail.com <da...@googlemail.com> #5
Tested it on HTC Desire S with Android 2.3.5, still broken.
jo...@gmail.com <jo...@gmail.com> #6
Tested it on HTC Sensation with Android 4.0.3, still broken.
OnNewIntent() is never called.
OnNewIntent() is never called.
mi...@tyclipso.net <mi...@tyclipso.net> #7
Same here. Android 2.1. MainActivity's launchMode is "singleTop" and onNewIntent is not called. It does only when I use "singleTask", but this seems to has side effects when starting the app from launcher to often.
xc...@gmail.com <xc...@gmail.com> #8
I'm seeing this on a 4.0.1 phone (Galaxy Nexus)
vi...@gmail.com <vi...@gmail.com> #9
Same: Samsung Nexus S running 4.0.4
da...@gmail.com <da...@gmail.com> #10
Same issue :(
da...@gmail.com <da...@gmail.com> #11
I found that onNewIntent will be called as described in documentation if both launchMode="singleTop" and Intent.FLAG_ACTIVITY_SINGLE_TOP are setted
en...@google.com <en...@google.com>
[Deleted User] <[Deleted User]> #13
problem still on android 6 and 7
mi...@gmail.com <mi...@gmail.com> #14
For the love of god, can we get this fixed
vi...@gmail.com <vi...@gmail.com> #15
This is still a problem.
gw...@gmail.com <gw...@gmail.com> #16
Been over 1 decade now. onNewIntent is still not called if the app is already running
jo...@gmail.com <jo...@gmail.com> #17
Hi Team
Same issue facing too me.
Issue Phenomenon:
In our device which run on AOSP10 is having launcher that has 5 navigation screens.
1.From Screen #2, when we launch any applications
2.Then we Pressed the Home key
3.Launcher is navigating to the Screen #3( Center navigation screen of launcher)
Actual behaviour is it moving to Screen #3 ( Center navigation screen of launcher) in AOSP10. We are considering this as a bug.
AOSP6: Launch any application from Screen#2 and after pressing the home key it is navigating back to the same screen(Screen #2).This is the expected behaviour.
Additional information:
In AOSP10, we have found that onNewIntent() was called before the "FLAG_ACTIVITY_BROUGHT_TO_FRONT" flag was set.
This phenomenon is already reported and it is addressed only in the AOSP7 platform(Reference Link :https://cs.android.com/android/_/android/platform/frameworks/base/+/f73d0853953198945b905695c93e562209a861c5 )
We have below set of queries,
1. Why it is applied only in AOSP7 platform?
2. Why the fix is not ported to AOSP8 through AOSP10 platform?
3. Why does AOSP7 remove the flagging process for singleTop that was present on line 1526?
mStartActivity.intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
Please let us know above queries answer asap.
Same issue facing too me.
Issue Phenomenon:
In our device which run on AOSP10 is having launcher that has 5 navigation screens.
1.From Screen #2, when we launch any applications
2.Then we Pressed the Home key
3.Launcher is navigating to the Screen #3( Center navigation screen of launcher)
Actual behaviour is it moving to Screen #3 ( Center navigation screen of launcher) in AOSP10. We are considering this as a bug.
AOSP6: Launch any application from Screen#2 and after pressing the home key it is navigating back to the same screen(Screen #2).This is the expected behaviour.
Additional information:
In AOSP10, we have found that onNewIntent() was called before the "FLAG_ACTIVITY_BROUGHT_TO_FRONT" flag was set.
This phenomenon is already reported and it is addressed only in the AOSP7 platform(Reference Link :
We have below set of queries,
1. Why it is applied only in AOSP7 platform?
2. Why the fix is not ported to AOSP8 through AOSP10 platform?
3. Why does AOSP7 remove the flagging process for singleTop that was present on line 1526?
mStartActivity.intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
Please let us know above queries answer asap.
Description
SingleInstanceActivity has launchMode="singleInstance" and
SingleTopActivity has launchMode="singleTop".
The SingleInstanceActivity calls startActivity() to start SingleTopActivity without any additional Intent flags like this:
Intent intent = new Intent(this, SingleTopActivity.class);
startActivity(intent);
- Steps to reproduce the problem:
Using the attached code, do the following:
1. Launch the program "SingleTop bug" from the home screen
2. Click FIRST button "Start Activity without FLAG_ACTIVITY_SINGLE_TOP"
3. See SingleTop Activity shows onCreate(), onStart(), onResume()
4. Click the HOME button to return to the home screen
5. Launch the program "SingleTop bug" from the home screen again
6. Click FIRST button "Start Activity without FLAG_ACTIVITY_SINGLE_TOP"
7. See SingleTop Activity shows onPause(), onStop(), onStart(), onResume() however onNewIntent() is never called.
- What happened:
The first time SingleTopActivity is launched without FLAG_ACTIVITY_SINGLE_TOP, onCreate() and onResume() are called in SingleTopActivity. This is correct.
The second time SingleTopActivity is launched without FLAG_ACTIVITY_SINGLE_TOP, onResume() is called in SingleTopActivity, BUT onNewIntent() is NOT called in SingleTopActivity. This is incorrect.
- What you think the correct behavior should be:
The correct behavior should be as documented in the description of "launchMode" at
"...if the target task already has an existing instance of the activity at the top of its stack, that instance will receive the new intent (in an onNewIntent() call); a new instance is not created."
I have tried this on several different devices and several versions of Android OS (2.2, 2.1, 1.6) so it looks like it has been there for awhile.
Please see also
NOTE: The attached code also has a second button labelled "Start Activity with FLAG_ACTIVITY_SINGLE_TOP". Using this demonstrates the correct behaviour. It is therefore REQUIRED to set FLAG_ACTIVITY_SINGLE_TOP when launching a SingleTop activity to achieve the behavior described in the documentation.