共享preferences和Android的内容提供商之间的差异 [英] Difference between Shared Preferences and Content Providers in android

查看:141
本文介绍了共享preferences和Android的内容提供商之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道部分有关共享preferences和intents.But我想知道什么是共享preferences和内容提供商的Andr​​oid?并且还什么是意图之间的基本区别,共享preferences和内容提供商

I know partially about Shared preferences and intents.But i want to know what are shared preferences and content providers in android ? And also what is the basic difference between intents , shared preferences and content providers.

请解释一下我这个。

推荐答案

共享preferences在那里你可以存储的秘密信息,为您的应用程序,就像在浏览器中设置cookie的位置,这可以用来登录凭据等。

shared preferences are the location where you can store the secret information for your app, like setting cookies in the browser, this can be used for login credentials and other.

在这里为内容提供商存储和检索数据,并提供给其他应用程序也可以。像假设你想访问在Android手机上提供的联系方式,他们可以通过内容提供商访问

where as content provider stores and retrieves the data and make it available to other applications also. like suppose you want to access the contacts available in the android phone, they can be accessed by content providers

这篇关于共享preferences和Android的内容提供商之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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