android - 我的应用程序未显示在最近的应用程序列表中

时间:2013-02-27 18:45:27

标签: android android-manifest android-lifecycle

我正在开发一款应用,并且刚刚意识到它没有显示在最近的应用列表中。

我在应用程序中有2个活动,无论我在点击Home键时我在哪个活动,该应用程序都不会显示在最近的应用程序列表中。

我已经看到了这个问题:SO Question但是将类别内容放在清单中并不适用于我。

以下是我的清单的一部分:

<application android:label="@string/app_name" >

    <service android:name=".UploadService" android:exported="false" />
    <service android:name=".DownloadService" android:exported="false" />

    <activity android:label="@string/app_name"
        android:excludeFromRecents="true"
        android:screenOrientation="portrait" 
        android:name="com.test.DOHSMain" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name="com.test.DOHSChange"
        android:label="@string/app_name" >
        <intent-filter>
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
</application>

有谁知道我做错了什么?

注意:我在第二个活动DOHSChange上添加了标签,以防万一有或没有这条线似乎无能为力。

感谢您的时间

2 个答案:

答案 0 :(得分:6)

从清单中删除android:excludeFromRecents="true"

答案 1 :(得分:2)

您的启动器活动中有android:excludeFromRecents=true