Search code examples
androidandroid-contentprovider

Is it necessary to put table name in URI? what if we have two tables in content provider?


i have one question regarding URI! i have two tables in my content provider! to use both table i required URI for each table??


Solution

  • You can have a Parent uri and table names appended for the Uri of each of the tables for example

    content://myapp/content
    content://myapp/content/table1
    content://myapp/content/table2
    
    ....