android – 在intent-filter中处理https架构

我在Manifest中有一个intent过滤器来处理url上的tap,如果url匹配我的应用程序启动的过滤器数据.

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.broWSABLE" />
  <data android:scheme="http" android:host="*" port="8765" android:path="/mypath" />
</intent-filter>

当模式为“http”时,Intent过滤器工作,但如果我将其更改为“https”,则意图过滤器不会执行任何操作,并且链接开始在浏览器中加载.

有人知道这里有什么问题吗?

解决方法:

只需在过滤器中添加额外的数据行:

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.broWSABLE" />
  <data android:scheme="http" android:host="*" port="8765" android:path="/mypath" />
  <data android:scheme="https" android:host="*" port="8765" android:path="/mypath" />
</intent-filter>

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...