当单击另一个应用程序中的链接(我的应用程序未启动)时,我的应用程序将在该应用程序的顶部打开。 例如,如果有人从电报中单击指向我的应用程序的链接,则会在电报应用程序上方打开我的应用程序。即使在最近的应用列表中也看不到我的应用。
(https://i.stack.imgur.com/YrX4C.jpg)
AndroidManifest文件:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="app.freeairdrop.io">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application
android:appCategory="productivity"
android:hardwareAccelerated="true"
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:name=".ApplicationClass"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name="app.freeairdrop.io.MainActivity"
android:label="@string/app_name"
android:configChanges="orientation|screenSize|screenLayout"
android:resizeableActivity="false"
android:supportsPictureInPicture="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="freeairdrop.io" />
</intent-filter>
</activity>
</application>
</manifest>
答案 0 :(得分:0)
尝试一下。
对于您的每项活动android:excludeFromRecents="true"
<activity
android:name=".Activity"
android:excludeFromRecents="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>