【问题标题】:My webview app open on top of another app我的 webview 应用程序在另一个应用程序之上打开
【发布时间】:2019-08-25 14:35:42
【问题描述】:

单击另一个应用程序中的链接时(我的应用程序未启动),我的应用程序将在该应用程序之上打开。 例如,如果有人从电报点击我的应用程序的链接,它会在电报应用程序之上打开我的应用程序。甚至,我在最近的应用列表中也看不到我的应用。

(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>



【问题讨论】:

    标签: android android-studio webview deep-linking


    【解决方案1】:

    试试这个..

    为您的每一项活动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>
    

    【讨论】:

      猜你喜欢
      • 2012-03-12
      • 2017-10-07
      • 1970-01-01
      • 2011-03-21
      • 1970-01-01
      • 2022-01-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多