内容提供商和QUOT;&QUOT之间准确的区别;和" SQLite数据库" [英] Exact Difference between "Content-Provider" and "SQLite Database"

查看:114
本文介绍了内容提供商和QUOT;&QUOT之间准确的区别;和" SQLite数据库"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做了SQLite数据库编程的Andr​​oid,但我不知道任何有关 内容提供者,除了这一点:正如我刚才提到 Android开发者页面,Android SDK中解释关于内容提供商,因为它被用于存储和检索数据。

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 explained about "Content-provider" as it is used to store and retrieve data."

不过,

  1. 什么是内容提供者和SQLite数据库?
  2. 之间准确的区别
  3. 在哪一个是最好存储数据,当
  1. What is the exact difference between "Content-Provider" and "SQLite Database"?
  2. Which is best to store data, when ?

任何例子或者帮助!!

Any example or helps !!

推荐答案

我发现一个主要区别,具体如下:

I found one major difference, as follows:

在数据库中存储你的数据是坚持你的数据的一个好方法,但有一个在Android中创建的Andr​​oid系统数据库的警告是 可见 只对创建它们的应用程序。也就是说,由一个应用程序上的Andr​​oid创建SQLite数据库是可用的仅由该应用,而不是由其它应用

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.

因此​​,如果您 需要应用程序之间共享数据,您需要使用内容提供者模型的建议,在Android系统。 本文presents内容提供商的基础知识以及如何实现的。

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.

我发现这篇文章在此链接

提供非常好的信息。

这篇关于内容提供商和QUOT;&QUOT之间准确的区别;和" SQLite数据库"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆