When we access content provider from multiple content resolvers (in different process) or thread, does it create multiple instances of provider? If yes, how are instances created and how are DB read-write operations synchronized?
By default there is only one instance of a Content Provider and it is hosted in the process hosting the application to which the Content Provider belongs. It is possible to configure it in such a way that a separate instance of Content Provider is created in every process that uses that Content Provider. This configuration is done in the AndroidManifest.xml of the application to which the Content Provider belongs. Refer to this
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