Why should I use custom content provider in Android?
What are advantages of using custom content provider? Why such content provider is superior of 开发者_如何转开发plain class that wraps SQL queries?
Content providers can be used from other processes and are required by some mechanisms on Android like the global search. There are also some classes available that help you deal with content providers that save you some of the hassle of manging memory.
Other apps will be able to access your data.
You can wrap and abstract a lot of the query logic in your content provider, and limit access.
You will be able to lean on the system to allow for things like managed queries.
精彩评论