我如何启动我的应用程序,通过自定义URL的电子邮件 [英] How do I launch my app via a custom URL in an email
问题描述
我添加使用 Android的自定义URL:在我的意图过滤器方案
如下:
<意向滤光器>
<作用机器人:名称=android.intent.action.VIEW/>
<类机器人:名称=android.intent.category.DEFAULT/>
<数据机器人:计划=myscheme机器人:主机=myhost的/>
&所述; /意图滤光器>
我用发送手机电子邮件的内容如下:
myscheme:// myhost的数据=什么
但上面的链接显示为纯文本,即不为链接。
您需要发送的电子邮件中的HTML, 您在链接的
< A>
标签:< A HREF ='myscheme:// myhost的数据=什么'>启动
应用
自动链接分析几乎是 当然只有链接完成 首先是
的http://
或WWW
,和 它从电子邮件客户端不同的电子邮件 客户端反正。
好吧,我试过了,并没有奏效。唯一的解决办法,我可以提供的是实际使用 的http://
的链接将您的网站,到一个特定的应用程序页面,用同样的GET参数。可以注册意向滤波器与该应用截获此并适当地处理它,并且如果用户不具有应用程序,该网页指示他们安装。
I'm adding a custom URL using the android:scheme
in my intent filter as follows
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="myscheme" android:host="myhost" />
</intent-filter>
I'm sending the phone an email with the following in the contents:
myscheme://myhost?data=whatever
but the above link shows up as plain text, i.e. not as a link.
You need to send your email in HTML, with your link in an
<a>
tag:<a href='myscheme://myhost?data=whatever'>Launch
App
Automatic link parsing is almost certainly only done with links starting with
http://
orwww.
, and it varies from email client to email client anyway.
Ok, I tried that and it didn't work. The only solution I can offer is to actually use http://
with a link going to your site, to a specific app page, with the same GET parameters. You can register an intent-filter to intercept this with the app and handle it appropriately, and if the user doesn't have the app, the web page instructs them to install it.
这篇关于我如何启动我的应用程序,通过自定义URL的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!