Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 0.61 KB  |  hits: 37  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Android - matching a url pattern?
  2. http://www.example.com/abc123/foo/xyz789
  3.        
  4. <activity>
  5.   <intent-filter>
  6.     <action
  7.       android:name="android.intent.action.VIEW" />
  8.     <category
  9.       android:name="android.intent.category.DEFAULT" />
  10.     <category
  11.       android:name="android.intent.category.BROWSABLE" />
  12.  
  13.     <data
  14.       android:scheme="http"
  15.       android:host="example.com"
  16.       android:pathPattern="/.*/foo/.*" />
  17.        
  18. myexample.com
  19. myexample.com/whatever
  20.        
  21. <data android:scheme="http"
  22.       android:host="example.com"
  23.       android:pathPattern="/[^\/]*/foo/.*" />
  24.        
  25. http://www.example.com/.+/foo/.+