I have been tasked with designing my web services client code to use the utility class UriMatcher in the Android SDK. Unfortunately, the example in the Dev Guide does not relate to anything in my mind. I know I am missing some fundamental points to the functionality and possibly about Uri itself. If you can tie it to some web APIs that are accessible with HTTP POST request, that would be ideal.
Share
UriMatcher is a convenience class that allows a many-to-one mapping by using pattern matching. It simplifies the design communication in a list-style representation. The numeric assignment allows one to insert, remove and rearrange patterns without effecting the match. This is especially useful when the match is used in a switch statement as the ‘case’ value — the handling logic does not have to change.