ContentProvider官方教程(6)provider支持的数据类型
Provider Data Types
Content providers can offer many different data types. The User Dictionary Provider offers only text, but providers can also offer the following formats:
- integer
- long integer (long)
- floating point
- long floating point (double)
Another data type that providers often use is Binary Large OBject (BLOB) implemented as a 64KB byte array. You can see the available data types by looking at the Cursor class "get" methods.
The data type for each column in a provider is usually listed in its documentation. The data types for the User Dictionary Provider are listed in the reference documentation for its contract class UserDictionary.Words (contract classes are described in the section Contract Classes). You can also determine the data type by calling Cursor.getType().
Providers also maintain MIME data type information for each content URI they define. You can use the MIME type information to find out if your application can handle data that the provider offers, or to choose a type of handling based on the MIME type. You usually need the MIME type when you are working with a provider that contains complex data structures or files. For example, the ContactsContract.Data table in the Contacts Provider uses MIME types to label the type of contact data stored in each row. To get the MIME type corresponding to a content URI, call ContentResolver.getType().
The section MIME Type Reference describes the syntax of both standard and custom MIME types.
ContentProvider官方教程(6)provider支持的数据类型的更多相关文章
- ContentProvider官方教程(10)<provider>元素及属性介绍
The <provider> Element Like Activity and Service components, a subclass of ContentProvider mus ...
- ContentProvider官方教程(8)自定义MIME
MIME Type Reference Content providers can return standard MIME media types, or custom MIME type stri ...
- ContentProvider官方教程(9)定义一个provider完整示例:实现方法,定义权限等
Creating a Content Provider In this document Designing Data Storage Designing Content URIs Implement ...
- ContentProvider官方教程(1)何时用content provider
Content Providers Content providers manage access to a structured set of data. They encapsulate the ...
- ContentProvider官方教程(11)Calendar Provider、Contacts Provider、Storage Access Framework
Calendar Provider: guide/topics/providers/calendar-provider.html Contacts Provider: guide/topics/pro ...
- ContentProvider官方教程(5)ContentResolver插入、更新、删除 示例
Inserting, Updating, and Deleting Data In the same way that you retrieve data from a provider, you a ...
- ContentProvider官方教程(2)简介、Content URIs
In this document Overview Accessing a provider Content URIs Content Provider Basics A content provid ...
- ContentProvider官方教程(7)3种访问形式:批处理、异步访问、intent间接访问(临时URI权限)
Alternative Forms of Provider Access Three alternative forms of provider access are important in app ...
- ContentProvider官方教程(4)ContentResolver权限
Content Provider Permissions A provider's application can specify permissions that other application ...
随机推荐
- URAL 1146 Maximum Sum(DP)
Given a 2-dimensional array of positive and negative integers, find the sub-rectangle with the large ...
- 移动widget开发
发现Oracle----php连接有很多bug无法解决,只好转向php--连接mysql数据库,并装载了mysql两个文件,跟客户端NAVICAT_FOR_MYSQL,然后直接建表,用于测试,能够连通 ...
- angular 倒计时
$scope.countdown = ; var myTime = setInterval(function() { $scope.countdown--; $scope.$digest(); // ...
- 类名.class, class.forName(), getClass()区别
1:Class cl=A.class; JVM将使用类A的类装载器, 将类A装入内存(前提是:类A还没有装入内存),不对类A做类的初始化工作.返回类A的Class的对象. 2:Class cl=对象引 ...
- 夺命雷公狗---DEDECMS----31dedecms数据库创建一张表完成curl操作
首先我们创建一张测试表,格式如下所示: 然后我们还是在plus目录下创建一个test3.php进行测试,首先写一个添加的: <?php header("Content-Type:tex ...
- Android自动化压力测试快速入门教程(图解)——MonkeyRunner
一.MonkeyRunner测试环境配置(转自) 1. android-sdk 下载地址:http://www.android-doc.com/sdk/index.html 下载完成后,只需要解压就 ...
- android 项目学习随笔五(JSON解析)
1.利用Xutils获取网络数据 /** * 从服务器获取数据 需要权限: <uses-permission * android:name="android.permission.IN ...
- overflow的劲爆知识点
1.属性 visible(默认) hidden(此处是隐藏不是裁剪) scroll(滚动条) auto(智能路线 当超出范围时则出现滚动条) inherit 不常用 存在兼容性问题 2.进入CSS3 ...
- linux终端使用技巧
Shift+Ctrl+T:新建标签页Shift+Ctrl+W:关闭标签页Ctrl+PageUp:前一标签页Ctrl+PageDown:后一标签页Shift+Ctrl+PageUp:标签页左移Shift ...
- linux下配置环境变量【原创】
用户目录下的.profile, 你只需要在用户目录下,创建bin目录,在里面放入你想要执行的可执行文件,就可以在命令行下就可以使用了 # ~/.profile: executed by the com ...