I'm implementing a custom adapter that iterates over some database entries which in turn link back to the Android contacts database. The adapter will make the query to the content resolver and bind the data from the returned cursor into the view. However, suppose I add a contact to my private database, then remove it from the Android contacts list. The query will fail, and ideally in that case I want to delete that entry from the database and try the next one, and invalidate the view that I'm supposed to be binding so it doesn't show up on the screen.
I don't see an obvious way to do that from the SDK docs, so I thought I'd ask lazyweb!
The other solution is to iterate through the whole private contact database on instantiation and prune all the bad entries, but I consider that very expensive.