What is Uri Matcher in android.content.UriMatcher
How to use it? Can someone please explain meaning of following three line of code?
uriMa
One more thing I wanted to add that wasn't clear for me first time I used UriMatcher.
Is that if you want to parse an HTTP url then as an AUTHORITY parameter in the addURI you need to pass the target domain name. For example:
Uri mUri = Uri.parse("http://example.com/foo");
UriMatcher sURIMatcher = new UriMatcher(UriMatcher.NO_MATCH);
// if not "example.com" below the match will always return -1 result
sURIMatcher.addURI("example.com", "/foo", 123);
int match = sURIMatcher.match(mUri);
UriMatcher Documentation doesn't cover this case and it's not clear what's this authority parameter for. Gosh if I knew that it would save me some time!