Skip to content Skip to sidebar Skip to footer

Urimatcher Not Recognizing Pattern

I'm having trouble with matching URIs in my ContentProvider. It will match paths with one or two 'tags' (not sure what the correct term is), for example it can recognize box/#. But

Solution 1:

Try this:

sURIMatcher.addURI(AUTHORITY, "box", BOXES);
sURIMatcher.addURI(AUTHORITY, "box/#", BOXES_ID);
sURIMatcher.addURI(AUTHORITY, "box/#/item", BOX_ITEM);
sURIMatcher.addURI(AUTHORITY, "box/#/item/#", BOX_ITEM_ID);
sURIMatcher.addURI(AUTHORITY, "item", ITEMS);
sURIMatcher.addURI(AUTHORITY, "item/#", ITEMS_ID);

The order is important, read my explanations here: https://stackoverflow.com/a/15015687/534471

Post a Comment for "Urimatcher Not Recognizing Pattern"