I have a simple doubt regarding Android Content providers .
While inserting a single record into db I am returning a URI by appending the _id fetched from the insert()
method and also I am calling getContentResolver().notifyChange()
on this URI .
So now my URI will be "content://CONTENT_AUTHORITY/TABLE_NAME/_id"
.
But while fetching a single record , I am fetching it by selecting another id (a composite key) let it be movie_id
.
So to fetch this my uri will be "content://CONTENT_AUTHORITY/TABLE_NAME/movie_id"
Now i will be able to fetch a record since my URI matcher matches only /TABLE_NAME/# records.
But what happens to the first URI which was created, on which I had created the notifyChange()
method?
Is it bad practice to do so, since I am using notifyChange(
) on one URI but I am fetching using other URI?