转自:http://cthhqu.blog.51cto.com/7598297/1281217 1. ContentProvider的概述 ContentProvider: (Official Definition)Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security. Con…
Inserting, Updating, and Deleting Data In the same way that you retrieve data from a provider, you also use the interaction between a provider client and the provider's ContentProvider to modify data. You call a method of ContentResolver with argumen…
Retrieving Data from the Provider This section describes how to retrieve data from a provider, using the User Dictionary Provider as an example. For the sake of clarity, the code snippets in this section call ContentResolver.query() on the "UI thread…
Cursor cursor = context.getContentResolver().query(Sms.CONTENT_URI, new String[]{"thread_id from sms where type = 3 group by thread_id-"}, // 可以这样使用. null, null, null); 07-17 10:55:17.084: E/AndroidRuntime(30157): FATAL EXCEPTIO…
Content provider的作用: Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security. Content providers are the standard interface that connects data in one process with code r…
说说ContentProvider . ContentResolver . ContentObserver 之间的关系**a. ContentProvider 内容提供者,用于对外提供数据 b. ContentResolver.notifyChange(uri)发出消息 c. ContentResolver 内容解析者,用于获取内容提供者提供的数据 d. ContentObserver 内容监听器,可以监听数据的改变状态 e. ContentResolver.registerContent…