Android深度链接问题

时间:2016-04-07 22:19:59

标签: android deep-linking

我尝试打开时遇到问题<a href="tohome://print?https://qcblob.blob.core.windows.net/testing/LabelTesting/label_sample2.png">items</a>此链接无法打开应用程序。

我的清单文件:

        <activity
            android:name=".Main2Activity"
            android:exported="true">
            <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="print?" android:scheme="tohome"/>
        </intent-filter>
        </activity>

1 个答案:

答案 0 :(得分:1)

如果这是目标链接

tohome://print?https://qcblob.blob.core.windows.net/testing/LabelTesting/label_sample2.png

然后,在这种情况下,您的host只是print

<data android:host="print" android:scheme="tohome"/>

典型的URL将遵循以下格式

  

方案:[// [用户:密码@]主机[:端口]] [?查询] [/]的路径[#片段]

在这种格式中,?字符将是将主机与实际查询字符串分开的分隔符。

相关问题