My application is in running mode[foreground] and user clicks on home button, which puts application to background[and still running]. I ha
From my test, to mimic the Launcher behavior, the key is to:
intent.setPackage(null);
after
Intent intent = packageManager.getLaunchIntentForPackage(pkName);
Other methods in this thread doesn't work in my case.
Thanks to jiaqing's answer, I post this answer as I don't have the right to comment. I don't know the logic behind this either, I guess it's related with the task owner. Anyone knows, would be glad to know.