邮件链接打开我对特定的URL应用 [英] Mail link open my app on specific URL

查看:294
本文介绍了邮件链接打开我对特定的URL应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实际使用的人行横道的。结果
我对谈论我的项目的一些硬约束,所以我会尽量尽可能明确。结果

I'm actually using Crosswalk.
I have some hard restrictions about speaking about my project so i'll try to be as clear as possible.

当我手动打开我的应用程序,网页视图加载网站的主页的 index.html的的。
结果
但是,这个网站是用于 WebRTC技术这样,它通过与特定的URL的电子邮件发送邀请。

When I open my app manually, Webview load the home index.html of the website.
But this website is used for WebRTC so, it send an invitation via an e-mail with specific URL.


  • 是可以打开的我的与网址的应用程序,我只是点击?

  • Is that possible to open my own application with URL that I just clicked ?

我查了一些<意向滤光器> ,但我不知道如何处理的URL打开

I checked for some <intent-filter> but I have no clue how to deal with the URL opening.

希望有人有一些解决方案或线索。

Hope someone have some solutions or clues.

编辑:

<intent-filter>
        <data android:scheme="https" android:host="xxx.xxx.com"/>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.BROWSABLE"/>
        <category android:name="android.intent.category.DEFAULT"/>
</intent-filter>

使用,我可以打开我的应用程序,当我点击一个链接,但我仍然需要得到链接的URL,并将其设置为URL我XWalkView加载。

With that I can open my application when I click on a link, but I still need to get the link url and set it as url loaded in my XWalkView.

示例:

https://xxx.xxx.com/join?xertfgf=1
结果当我点击的是,我的应用程序开放好,但知道我要我的XWalkView加载这一点。

https://xxx.xxx.com/join?xertfgf=1
When I click on that, my app open good, but know i want my XWalkView to load this.

说明:C

推荐答案

问题解决了:

设置完成后&LT;意向滤光器&gt; correclty,如果你使用人行横道(它会与古典或科尔多瓦web视图工作)只是:

After setting <intent-filter> correclty, if you use Crosswalk ( it will work with classic or Cordova Webview ) just :

Intent intent = getIntent();
String link = intent.getDataString();
xWalkWebView.clearCache(true);
if(link!=null){
    xWalkWebView.load(link, null);
} else {
    xWalkWebView.load("file:///android_asset/index.html", null);
}

这篇关于邮件链接打开我对特定的URL应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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