无法从网络浏览器启动应用程序 [英] Unable to launch app from web browser

查看:380
本文介绍了无法从网络浏览器启动应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想推出我的应用程序,如下所述:<一href=\"http://stackoverflow.com/questions/2958701/launch-custom-android-application-from-android-browser\">Launch从Android浏览器定制的Andr​​oid应用程序
结果我创建意图过滤器在我的清单:

I'm trying to launch my app as stated here: Launch custom android application from android browser
I've created intent-filter in my manifest:

<activity
            android:name=".ui.BaseActivity"
            android:label="@string/app_name"
            android:launchMode="singleTop" 
            android:configChanges="orientation|keyboard|keyboardHidden|screenSize">
            <intent-filter>
                 <data android:scheme="http" android:host="somesite.com"/>
                 <action android:name="android.intent.action.VIEW"/>
                 <category android:name="android.intent.category.BROWSABLE" />
                 <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

但是,当我在股票浏览器somesite.com类型 - 它加载somesite.com,而不是启动我的应用程序。怎么了?
结果PS:此 http://stackoverflow.com/a/13019256/1548085 没有帮助。

推荐答案

键入在浏览器中的链接不会启动的意图:浏览器只是浏览到一个URL。当您按照(即点击)在浏览器中的链接的意图机制仅用于

Typing a link in the browser doesn't start an intent: the browser just browses to that URL. The intent mechanism is only used when you follow (i.e. click) a link in the browser.

这篇关于无法从网络浏览器启动应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆