Closed hannesa2 closed 10 years ago
This is how we do it in our app
context.getContentResolver().notifyChange(Baskets.CONTENT_URI, null);
Where Baskets
is the table or view we want to notify of an update
perfect ! Thank you
do you know, when I do bulk inserts like
getContentResolver().bulkInsert(Recipes.CONTENT_URI, values);
does the ContentResolver reflect the insert with a notification ? If yes, is there a way the prevent my app doing so ?
Yes I think it does, but you can control it with a Uri parameter, ie:-
Uri uri = Recipes.CONTENT_URI
.buildUpon()
.appendQueryParameter(MechanoidContentProvider.PARAM_NOTIFY, "false")
.build();
getContentResolver().bulkInsert(uri, values);
This is what the records and builders do under the hood :)
perfect ! Thank you
Is there a elegant way to force a
normally I do this (works like a charm)
but when I do some sophisticated updates with ndk direct on database, I want inform my loaders to restart without any dummy update like at the top