What is difference between ContentObserver
and DatasetObserver
?
When one or another should be used?
I get Cursor
with sing
To provide the supplement to ptc's answer, DataSetObserver
is used for handling content changes in the Adapter, for example, it can be used for updating listview dynamically with Adapter. You can register a DataSetObserver
using the Adapter#registerDataSetObserver()
method.
DataSetObserver
can also be used to observe the content changes in the Cursor in a similar fashion.