android java打开wap链接_java-处理Android浏览器/ webview中的链接以直接启动应用程序...

我希望通过链接打开我的应用程序,

遵循Make a link in the Android browser start up my app?的指示.

好吧,它工作正常(大多数时候….这就是我寻求帮助的原因).

我的html链接是

Open Application

我的意图过滤器采用以下形式

到目前为止一切顺利(我希望).从浏览器的m-o-s-t正常工作.

为了测试以上内容,我编写了一个演示活动

final WebView webview = new WebView(this);

setContentView(webview);

webview.loadUrl("http://www.myhomepage.com/");

http://www.myhomepage.com/页面具有一些自定义链接/ href(包括

目的).

按常规链接可以打开带有这些链接的浏览器,但按我的“特殊

链接”(内部网)打开404页面

Web page not available

intent:#Intent;action=com.mark.MY_ACTION;end

might be temporarily down….

虽然黛安(Diane)在The above link中提到,

They allow you to direct the launch to only your app without the user having the option of instead going to the browser or any other app.

解决方法:

您的Intent筛选器与Diana提到的相同

android:label="@string/app_name">

所以你应该像:

未测试是否需要android.intent.category.VIEW.让我知道它是否有效.

标签:java,android

来源: https://codeday.me/bug/20191207/2087282.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值