Android intent filter match end of path

116 Views Asked by At

How would I got about matching the end of a url?

Specifically, I want to match https://github.com/user/repo/projects for one activity, and https://github.com/user/repo with another

I tried using path pattern

            <data
                android:host="github.com"
                android:pathPattern=".*projects"
              />

or

            <data
                android:host="github.com"
                android:pathPattern=".*/projects"
                />

But this doesn't match the paths.

Edit- I have also tried

                <data
                    android:scheme="https"
                    android:host="github.com"
                    android:pathPattern="/.*/.*/projects"
                />

to match https://github.com/username/repo/projects

0

There are 0 best solutions below