数据:ContentResolver类

ContentResolver是通过URI来查询ContentProvider中提供的数据。除了URI以 外,还必须知道需要获取的数据段的名称,以及此数据段的数据类型

 
如果你需要获取一个特定的记录,你就必须知道当前记录的ID。
 
简要介绍ContentResolver的主要接口,如下:
返回值 函数声明
   final Uri insert (Uri url,
          ContentValues values)

Inserts a row into a table at the given URL.
   final int delete (Uri url,
             String where,
             String[] selectionArgs)

Deletes row(s) specified by a content URI.
 final Cursor query (Uri uri,
            String[] projection,
            String selection,
            String[] selectionArgs,
            String sortOrder)

Query the given URI, returning a Cursor over the result set.
   final int update (Uri uri,
             ContentValues values,
             String where,
             String[] selectionArgs)

Update row(s) in a content URI.
原文地址:https://www.cnblogs.com/yedushusheng/p/4333921.html