如何通过单击链接直接打开您的应用,而不显示选择器对话框

时间:2019-06-21 11:19:33

标签: java android

我有两个名为xxx和yyy的应用程序,并在同一个清单文件中进行配置,现在的问题是即时通讯在同一活动中为两个应用程序提供了深层链接。当我在浏览器中给出链接时,它显示了两个应用程序选项但是我想专门打开没有选择器选项的应用程序

这是清单文件

<application
    android:name=".app.BawagPskApp"
    android:allowBackup="true"
    android:fullBackupContent="false"
    android:hardwareAccelerated="true"
    android:icon="@drawable/klar_logo_app_icon_rounded"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme"
    tools:replace="android:icon">
    <activity
        android:name=".native_widget.cards.newcard.NewCardActivity"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>

    </activity>
    <activity
        android:name=".native_widget.cards.HotlineInfoActivity"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
        android:name=".native_widget.cards.onlinepayments.OnlinePaymentsActivity"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
        android:name=".native_widget.cards.cardlimits.CardLimitsActivity"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
        android:name=".native_widget.cards.atmwithdrawals.ATMWithdrawalsActivity"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
        android:name=".native_widget.cards.KlarInputActivity"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateVisible">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
        android:name=".native_widget.cards.geocontrol.GeoControlActivity"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />

    <activity
        android:name=".welcome.SplashScreenActivity"
        android:launchMode="singleTop"
        android:screenOrientation="portrait"
        android:theme="@style/NotchTheme">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".AppLinkData"
        android:launchMode="singleTask"
        android:screenOrientation="portrait"
        android:theme="@style/NotchTheme"
        android:windowSoftInputMode="adjustNothing">
        <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:host="registrationpage"
                android:pathPattern="/appplay"
                android:scheme="bawagpsk" />
        </intent-filter>
        <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:host="klar-onboarding.uat.bawagpsk.com"
                android:pathPattern="/ecr/"
                android:scheme="https" />
        </intent-filter>
        <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:host="klar-onboarding.prd.bawagpsk.com"
                android:pathPattern="/ecr/"
                android:scheme="https" />
        </intent-filter>


    </activity>
    <activity
        android:name=".DashboardActivity"
        android:launchMode="singleTop"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="adjustNothing" />
    <activity
        android:name=".ChildPageActivity"
        android:screenOrientation="portrait"
        android:theme="@style/PFMTheme"
        android:windowSoftInputMode="adjustResize" />
    <activity
        android:name=".SetNewPasswordSecurityActivity"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="adjustResize" />
    <activity
        android:name=".welcome.WelcomePageActivity"
        android:screenOrientation="portrait"
        android:theme="@style/NotchTheme"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
    <activity
        android:name=".UserGreetingActivity"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
    <activity
        android:name=".ui.WaitingScreenActivity"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
    <activity
        android:name=".ui.FeedbackActivity"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
    <activity
        android:name=".ui.FingerprintActivatedActivity"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
    <activity android:name=".native_widget.devicepairing.DevicePairSuccess" />

    <receiver
        android:name="com.microsoft.windowsazure.notifications.NotificationsBroadcastReceiver"
        android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />

            <category android:name="com.bawagpsk.bawagpsk" />
        </intent-filter>
    </receiver>

    <service android:name=".LucyPushNotification">
        <intent-filter>
            <action android:name="com.google.firebase.MESSAGING_EVENT" />
        </intent-filter>
    </service>
    <service
        android:name=".ApplicationClearBackgroundService"
        android:stopWithTask="false" />

    <meta-data
        android:name="net.hockeyapp.android.appIdentifier"
        android:value="${HOCKEYAPP_APP_ID}" />
</application>

这两个应用程序均已安装在我的设备中,当我给链接同时显示应用程序选项并且我想创建一个链接时,该链接将专门打开任一应用程序而没有给出选择器选项

0 个答案:

没有答案