Reputation: 3731
I have this URI
content://com.mycompany.data/routes?group=M01&office=BOCE&zone=EC01
And this rule
sUriMatcher.addURI("com.mycompany.data", "routes" + "?group=*&office=*&zone=*", ROUTE_LIST);
Yet the select on sUriMatcher goes to the default case (Wired to throw an exception). Any ideas why the pattern won't match? (And yes, ROUTE_LIST is on the cases for the select, with it's respective break)
Upvotes: 4
Views: 741
Reputation: 26547
UriMatcher
ignores the query string (anything after the ? in the Uri). Your content provider must handle parameters between slashes if you want to use this class. For example :
sUriMatcher.addURI("com.mycompany.data", "group/*", ...);
sUriMatcher.addURI("com.mycompany.data", "office/*", ...);
sUriMatcher.addURI("com.mycompany.data", "group/*/office/*", ...);
Upvotes: 6