android - Confused about Content provider contenturi and content provider authorities tag -


from google example below

as example of designing , coding content uri handling, consider provider authority com.example.app.provider recognizes following content uris pointing tables:  content://com.example.app.provider/table1: table called table1. content://com.example.app.provider/table2/dataset1: table called dataset1. content://com.example.app.provider/table2/dataset2: table called dataset2. content://com.example.app.provider/table3: table called table3. 

i confused here. example mean table1contentprovider, table2contentprovider, table3contentprovider pointing @ same authority url? read, each provider should have unique authority url.

or mean, there 1 provider here works 3 tables? if case, in query method of provider run sql query data related 3 tables?

from google example below

actually, this page, not 1 linked to.

does example mean table1contentprovider, table2contentprovider, table3contentprovider pointing @ same authority url?

there 1 provider, not 3 ("consider a provider").

from read, each provider should have unique authority url.

a contentprovider can support multiple authorities, via comma-delimited list in android:authorities attribute, though of time support one.

or mean, there 1 provider here works 3 tables?

correct.

if case, in query method of provider run sql query data related 3 tables?

in methods query(), examine uri supplied , perform operations specific supplied path. in aforementioned example, query() different things paths table1, table2/dataset1, table2/dataset2, , table3.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -