开发者

Android: Disable recent apps intent

I want to disable the recent apps intent that is fired from the icon when you hold the home button. I am currently detecting, in the onCreate(), if the intent is fired from the quick launch dialog, and then I call finish().

This entails that when the application goes to the background finish() is called so that when the app i开发者_如何学运维s launched it goes through the onCreate(). This requires strategic coding when switching between activities in the application.

I guess I can fire finish() in the onResume() also after detecting where the intent came from, but a bunch of unnecessary coding can be eliminated if the quick launch intent can simply be disabled.

Can the quick launch intent be disabled?


Can the quick launch intent be disabled?

Put android:excludeFromRecents="true" in the manifest for this activity. That will cause your activity not to appear in the list of recently used activities, which is what I am assuming you are calling the "quick launch".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜