我有存在于像这样的清单活动:防止系统启动的单个顶级活动与以往的意图
<activity android:name=".activity.Main" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http" android:host="asdf.com"/>
</intent-filter>
</activity>
使拦截和处理链接到http://asdf.com。在我处理了其中一个意图之后,我退出了我的主要活动。
如果我使用任务管理器返回到我的应用程序,它将使用与我已处理的数据相同的意图。是否有办法基本上清除或替换此意图,以便它不会被任务管理器重用?如果我正常启动,通过点击应用程序而不是使用任务管理器,它不会重用数据。
感谢
https://groups.google.com/forum/#!topic/android-developers/vrLdM5mKeoY。这可能是我唯一的答案 – 2012-02-07 14:33:20