5

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

rae1
  • 6,066
  • 4
  • 27
  • 48
user2464767
  • 53
  • 2
  • 4
  • Not directly familiar but can't you modify your pathPattern to be something along the lines of .*youtu.be* ? – Jay Snayder Jun 07 '13 at 20:02
  • Problem is that links like ...youtu.be%2FBUser&h... should not be opened. Those are links to YouTube profiles, not videos – user2464767 Jun 08 '13 at 07:51

1 Answers1

1

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

Community
  • 1
  • 1
petter
  • 1,765
  • 18
  • 22