I am developing an Android application that receives MMS and I read a lot of code. And there is contentResolver and ContentObserver, but I do not get what is the difference between them
Like this statement:
contentResolver.registerContentObserver(Uri.parse("content://mms-sms"), true, mmsObserver);
contentResolver.unregisterContentObserver(mmsObserver);
What is the difference between contentResolver and ContentObserver and what do they have to do with receiving MMS?
ContentProvider as the name suggests provides you a handle or a reference (generally a cursor)to a data set so that you can work with its data
ContentObserver is used to get notified if the data residing in the data set has changed. So it is used to observe the data source for changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With