单击Google Maps and bing Maps链接时打开我的应用程序

问题描述 投票:0回答:1

我希望我的应用程序出现在建议的应用程序列表中,以打开诸如Google Maps的地图链接,我尝试了此代码,但没有用

    <activity
        android:name=".ui.splash.SplashActivity"
        android:screenOrientation="portrait"
        android:theme="@style/SplashTheme">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </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="https://maps.app.goo.gl/"
                android:pathPrefix="/favloc"
                android:scheme="https" />
            <data
                android:host="https://binged.it"
                android:pathPrefix="/favloc"
                android:scheme="https" />

            <data android:scheme="favloc"
                android:host="google"/>
        </intent-filter>
    </activity>
java android xml android-layout manifest
1个回答
0
投票

您正在寻找的叫做“应用链接”

© www.soinside.com 2019 - 2024. All rights reserved.