Reputation: 1834
Is it possible to get notified when I delete an element using ContentResolver
?
For example, if I execute this:
context.getContentResolver().delete(SMS_URI, null, null);
it returns the number of rows deleted. But if I delete 10k element it might take some time. I want to update progressbar
during deleting and I think that deleting it one by one might be not optimal solution.
Upvotes: 0
Views: 496
Reputation: 3083
As you can look at the documentation all one has to do is to add:
context.getContentResolver().notifyChange(SMS_URI, null);
Some example for a better understanding:
Android Tutorial: Writing your own Content Provider
Upvotes: 2