what is UriMatcher in android content provider?
i. It is used for conversion logic from Uris to tables.
ii. It can be comparable to DNS, which converts URLs to IP addresses.
iii. it is used to store tables in databases.
i & ii
i, ii, & iii
It is used for conversion logic or mapping logic from Uris to tables.It is similar to DNS, which converts URLs to IP addresses.
Note : Just like how we use URLs to connect to servers in the internet (eg: http://google.com for google server) similarly, in android if any application wants to access the data hold by other applications which is shared via content provider, the client application has to access it via URI (Uniform resource identifier). URI's looks exactly like an URL.
When client application access our database tables using URI, UriMatcher will map that URI to appropriate table.
Back To Top