如何使用Android意图过滤器排除网址? [英] How to exclude URLs with Android Intent Filters?
问题描述
< data android:scheme =http
android:host =m.facebook.com
android:pathPattern =。*/>
Facebook应用程序会抛出一些网址,例如
http://m.facebook.com/l.php?u=http%3A%2F%2Fyoutu.be%2FBsKtRwSyLmM&h=9AQF5nU03&s=1
我想打开那些包含youtu.be但不是用户的URL(因为我想在应用程序中打开视频而不是用户配置文件) 。
我一直在寻找类似的东西,显然你只能过滤实际路径(在本例中为 php)而不是查询字符串(u = http%3A ...)。
和
一个解决方法(只适用于您正在寻找您自己的网页的引用):
Android浏览器Facebook R edirect不总是触发URL的意图
I saw some intent filters like this one.
<data android:scheme="http"
android:host="m.facebook.com"
android:pathPattern=".*"/>
Facebook app throws URLs like
http://m.facebook.com/l.php?u=http%3A%2F%2Fyoutu.be%2FBsKtRwSyLmM&h=9AQF5nU03&s=1
I want to open those urls that contain youtu.be but NOT user (as I want to open videos in the app not user profiles).
I have been looking for something similar, and apparently you can only filter the actual path (in this case "l.php") and not the query string (u=http%3A...).
Here is a similar questions: intent filter pathPrefix with question mark
And a workaround (works only if you are looking for references to your own page): Android Browser Facebook Redirect Does Not Always Trigger Intent for URL
这篇关于如何使用Android意图过滤器排除网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!