【发布时间】:2016-05-28 06:25:47
【问题描述】:
我正在尝试从浏览器和 Google 搜索中的 URL 打开我的 WebView 应用程序。
我尝试使用此处建议的以下代码:How to launch app on click of url in android
<intent-filter>
<data android:scheme="https" />
<data android:scheme="https" android:host="www.webviewurl.com"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
但它没有用。
我想强制打开所有网址,例如:
https://*.webviewurl.com/*
http://webviewurl.com/*
到 WebView 中的https://www.webviewurl.com/*。
我已经在服务器中使用.htaccess 完成了这部分。
我希望 URL 默认在 WebView 中打开。
【问题讨论】:
标签: android android-studio webview