摘要: Content Provider 属于Android应用程序的组件之一,作为应用程序之间唯一的共享数据的途径,Content Provider 主要的功能就是存储并检索数据以及向其他应用程序提供访问数据的借口。 Android 系统为一些常见的数据类型(如音乐、视频、图像、手机通信录联系人信息等)内置了一系列的 Content Provider, 这些都位于android.provider包下。持有特定的许可,可以在自己开发的应用程序中访问这些Content Provider。 让自己的数据和其他应用程序共享有两种方式:创建自己的Content Provier(即继承自ContentPro.. 阅读全文
posted @ 2013-10-15 16:32 MMLoveMeMM 阅读(176) 评论(0) 推荐(0)
摘要: 一、ContentProvider的概念 ContentProvider:为存储和获取数据提供统一的接口。可以在不同的应用程序之间共享数据。Android已经为常见的一些数据提供了默认的ContentProvider 1、ContentProvider使用表的形式来组织数据 无论数据的来源是什么,ContentProvider都会认为是一种表,然后把数据组织成表格 2、ContentProvider提供的方法 query:查询 insert:插入 update:更新 delete:删除 getType:得到数据类型 onCreate:创建数据时调用的回调函数 ... 阅读全文
posted @ 2013-10-15 14:04 MMLoveMeMM 阅读(135) 评论(0) 推荐(0)
摘要: 先看Application Fundamentals上的一段话:Android calls onSaveInstanceState() before the activity becomes vulnerable to being destroyed by the system, but does not bother calling it when the instance is actually being destroyed by a user action (such as pressing the BACK key)从这句话可以知道,当某个activity变得“容易”被系统销毁时,该 阅读全文
posted @ 2013-10-15 11:00 MMLoveMeMM 阅读(283) 评论(0) 推荐(0)