什么是推出谷歌浏览器的任何网站链接的意图 [英] What is the intent to launch any website link in Google Chrome

查看:272
本文介绍了什么是推出谷歌浏览器的任何网站链接的意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我想从我的应用程序的WebView打开Chrome应用程序在网站上特定链接时,用户点击。我认为这是可能的 https://developer.chrome.com/multidevice/android/intents,这里就这一点,对斑马线的应用程序,而不是谷歌浏览器。

Hi I want to open the website in chrome app from my app webview when user click on particular link. I see this is possible https://developer.chrome.com/multidevice/android/intents, here on this it's for the zxing app, not for google chrome.

<a href="intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end"> Take a QR code </a>

我要为谷歌浏览器相同的语法。目前,我的链接打开链接的网页流量,对点击我要指定铬的意图有像zxing。

I want same syntax for Google Chrome. Currently I am opening link in the webview, on click on link I want to specify a intent of chrome there like zxing.

在换言之,
我有,我开了一个特定的URL,然后网页视图如果XYZ或东西在网页视图用户点击有那么它应该打开谷歌浏览器之后。因此,对于这个我将在语法我要找的HTML添加一些镀铬意图标记 -

In other words, I have a webview in which I opened a particular URL then after if user click on "XYZ" or something in the webview there then it should open google chrome. So for this i will add some chrome intent tag in the html that's syntax I am looking –

如果您知道语法请分享打开谷歌浏览器的超链接。

Please share if you know syntax for opening Google Chrome any hyperlink.

先谢谢了。

推荐答案

看来你正在寻找新的Andr​​oid意图链接,将创建并明确意图为设备的​​链接。

It seems you're looking for the new Android Intents link that will create and explicit intent for the device for a link.

<a href="intent://<URL>#Intent;scheme=http;package=com.android.chrome;end">

为我工作。
所以

works for me. so

<a href="intent://stackoverflow.com/questions/29250152/what-is-the-intent-to-launch-any-website-link-in-google-chrome#Intent;scheme=http;package=com.android.chrome;end"> 

将带你在Chrome这个问题。
请注意,该计划是单独指定,所以如果要启动HTTPS链接,你就必须改变计划,计划= HTTPS

will take you to this question in Chrome. Note that the scheme is specified separately so if you want to launch https links, you'd have to change scheme to scheme=https

但由于每个人都说,一个明确的意图铬是一种非常非Android的事。更好的方法是指定,像这样的动作ACTION_VIEW:

But as everyone is saying, an explicit Chrome intent is a very non-Android thing to do. A better way would be to specify the ACTION_VIEW action like so:

<a href="intent://stackoverflow.com/questions/29250152/what-is-the-intent-to-launch-any-website-link-in-google-chrome#Intent;scheme=http;action=android.intent.action.VIEW;end;">

来源:您链接在同一页

谢谢,我今天学到了一些东西!

Thanks, I learned something today!

这篇关于什么是推出谷歌浏览器的任何网站链接的意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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