如何从浏览器打开Android应用程序

时间:2015-06-12 13:59:08

标签: android android-intent schema

给出的架构是" desk://"我的应用程序。当我从浏览器中调用此应用程序时如何打开我的应用程序?我经历了很多网站,但无法得出正确的结论。

1 个答案:

答案 0 :(得分:0)

通过在我的Manifest中将我的Activity的Intent Filter添加以下元素,我能够完成您对我个人网站的要求:

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

                <data
                    android:host="zackmatthews.com"
                    android:pathPrefix="/projects/"
                    android:scheme="http" />
            <data
                android:host="www.zackmatthews.com"
                android:pathPrefix="/projects/"
                android:scheme="http" />

单击指向项目页面的链接时,会产生以下输出: Open with dialog

相关问题