When to use a Content Provider

后端 未结 9 1479
没有蜡笔的小新
没有蜡笔的小新 2020-11-27 10:52

I understand that Content Providers are made to allow publicly sharing data between applications. However, I\'m wondering if anyone has thoughts about making a Content Provi

9条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 11:25

    Using a Content Provider can help in an additional level of abstraction - Putting it within your own application make add a significant development time to your project. However if you are using it to share data, application settings or configurations across multiple applications then the Content Provider is your choice.

    Watch your security levels and I would recommend using SQLcipher to encrypt data-at-reset (DAR) if your Content Provider is writing to SQLite. (I've used a content provider in a few solutions and provided the ability to take a live "snap shot" of the operational values for debugging and testing.)

提交回复
热议问题