Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude URLs with Android Intent Filters?

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).

like image 505
user2464767 Avatar asked Nov 13 '22 03:11

user2464767


1 Answers

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

like image 54
petter Avatar answered Nov 15 '22 05:11

petter