Is it possible (or recommended) to pass parameters to content providers via URIs on Android, similar to how web addresses use them? That is, can I use name / value pairs in the content: // URIs?
For example, I have a search provider that can search by name. I pass it the URI as follows:
Content: //com.example.app/name/john
This will return anyone with "john" in their names, including John, Johnathon, Johnson, etc.
I want to have an option (but not a requirement) for searching with exact names and not finding partial matches. I was thinking of doing something like this:
Content: //com.example.app/name/john Exact = True
This will mean that the search provider returns only those names that exactly match "John". But I have not seen any other examples of such parameters that are used in Android. Is there a better way? What am I missing here?
Thanks!
android
Max headroom
source share