Exact Difference between “Content-Provider” and “SQLite Database”

后端 未结 9 1646
名媛妹妹
名媛妹妹 2020-12-04 06:59

i have done SQLite database programming for Android, but i dont know anything about Content-Provider except this: \"As i have referred Android Developer page , Android SDK e

相关标签:
9条回答
  • 2020-12-04 07:47

    I found one major difference, as follows:

    Storing your data in a database is one good way to persist your data, but there's a caveat in Android-databases created in Android are visible only to the application that created them. That is to say, a SQLite database created on Android by one application is usable only by that application, not by other applications.

    So, if you need to share data between applications, you need to use the content provider model as recommended in Android. This article presents the basics of content providers and how you can implement one.

    I found this article at this link

    Really nice information provided.

    0 讨论(0)
  • Content Providers are used when you want to share your data across applications.

    If you have a database attached with an application and you want another application to use some data, you can implement a content provider that exposes the data

    0 讨论(0)
  • 2020-12-04 07:54

    Think of advanced Content Management Systems. Each object (page, image, news article, event item, etc.) has a content, an address, user permissions, and ways to interact with it from different parts of the system. Content Providers do that for Android. You can now share files or images you may have stored in your application. You can also create custom sharable objects, like bussiness contacts, editable notes, etc. And specify security and the default application to deal with such object when you open them from any other application.

    0 讨论(0)
提交回复
热议问题