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 ...
随机推荐
- fackbook的Fresco的Image Pipeline以及自身的缓存机制
fackbook的Fresco的Image Pipeline以及自身的缓存机制 配置之前.首先需要知道两点:一点是Bitmap缓存.一点是如果你仅仅需要一个缓存,那么不调用setSmallImageD ...
- [javascript] ajaxfileupload.js 跨域上传文件
原文地址: http://www.ueffort.com/jqueryajaxfileupload-js-duo-wen-jian-shang-chuan-chuan-zhi-kua-yu/ 跨域 这 ...
- MyEclipse安装插件的三种方法和使用心得
本文讲解MyEclipse(MyEclipse10)的三种方法,以TestNG为例 Eclipse update site URL: http://beust.com/eclipse. 一.通过My ...
- yii2顶部导航使用
yii2中使用顶部导航的具体方法: 1.视图中调用两个类: use yii\bootstrap\Nav;use yii\bootstrap\NavBar; 2. <?php ...
- 修改linux下mysql目录权限
1.进入当前目录:例cd /srun3/mysql 2.修改权用户限 chown -R mysql ipt_authd_remote(表示给ipt_authd_remotemysql权限) 3.修改用 ...
- 不小心rm删除文件怎么办
不小心rm删除文件怎么办 rm 命令的副作用越来越显现.而且rm掉之后的东西想找回来很困难.有2个原则: 1 永远不要在root下操作,尤其是rm命令 2 写一个别名,代替rm 我就是在~/.bash ...
- /etc/passwd /etc/shadow
一./etc/passwd/etc/passwd 文件是一个纯文本文件,每行采用了相同的格式: name:password:uid:gid:comment:home:shell name 用户登录名 ...
- laravel运行url404错误
url输入正确的根目录时老是提示404错误,竟然不知道为什么,稀里糊涂的,最后发现输入url时后面默认会加上一个\,一定记得把\去掉!!!!
- Install DBD::mysql for Perl in XAMPP in Mac , solving errors
我不知道 why,在 Mac 安装 DBI::mysql 总会报错 我为了给 cgi-bin 添加 mysql-perl 数据库支持,也是够麻烦的 make sure that mysql and m ...
- Android常见面试题目
1.Activity 的生命周期 转自:http://kb.cnblogs.com/page/70125/ 多谢楼主分享 首先看一下Android api中所提供的Activity生命周期图(不明白的 ...