How to exclude URLs using 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 the URLs that contain youtu.be, but NOT the user (since I want to open the video in the application, not in user profiles).

+4
source share
1 answer

I was looking for something similar, and apparently you can filter the actual path (in this case "l.php") and not the query string (u = http% 3A ...).

Here are similar questions: target filter pathPrefix with a question mark

And a workaround (works only if you are looking for links to your own page): Android browser Facebook redirect does not always work for URL

+1
source

Source: https://habr.com/ru/post/1485110/


All Articles