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支持的数据类型的更多相关文章

  1. ContentProvider官方教程(10)<provider>元素及属性介绍

    The <provider> Element Like Activity and Service components, a subclass of ContentProvider mus ...

  2. ContentProvider官方教程(8)自定义MIME

    MIME Type Reference Content providers can return standard MIME media types, or custom MIME type stri ...

  3. ContentProvider官方教程(9)定义一个provider完整示例:实现方法,定义权限等

    Creating a Content Provider In this document Designing Data Storage Designing Content URIs Implement ...

  4. ContentProvider官方教程(1)何时用content provider

    Content Providers Content providers manage access to a structured set of data. They encapsulate the ...

  5. ContentProvider官方教程(11)Calendar Provider、Contacts Provider、Storage Access Framework

    Calendar Provider: guide/topics/providers/calendar-provider.html Contacts Provider: guide/topics/pro ...

  6. ContentProvider官方教程(5)ContentResolver插入、更新、删除 示例

    Inserting, Updating, and Deleting Data In the same way that you retrieve data from a provider, you a ...

  7. ContentProvider官方教程(2)简介、Content URIs

    In this document Overview Accessing a provider Content URIs Content Provider Basics A content provid ...

  8. ContentProvider官方教程(7)3种访问形式:批处理、异步访问、intent间接访问(临时URI权限)

    Alternative Forms of Provider Access Three alternative forms of provider access are important in app ...

  9. ContentProvider官方教程(4)ContentResolver权限

    Content Provider Permissions A provider's application can specify permissions that other application ...

随机推荐

  1. CS2013调试DLL

    需要打开两个项目,一个是Win32Project1,由这个项目创建DLL,注意要在DLL函数前加上__declspec(dllexport),这样就会还配套生成一个.lib 然后再打开一个项目,一般为 ...

  2. VS2012发布网站详细步骤

    1.打开你的VS2012网站项目,右键点击项目>菜单中 重新生成一下网站项目:再次点击右键>发布: 2.弹出网站发布设置面板,点击<新建..>,创建新的发布配置文件: 输入你自 ...

  3. 夺命雷公狗—angularjs—3—表单验证的高级用法

    其实我们的angularjs都是是块状代码,其实是可以在实际开发中保存下来以后就可以达到重复利用的目的了.. 废话不多说,直接上代码: <!doctype html> <html l ...

  4. 二招解决php乱码问题

    PHP的乱码问题已经说了N+1遍了,但还是经常看到新手不知道该如何解决php乱码问题,在此本人再重新给总结一下,希望对新手有点帮助 php网页出现乱码一般是在建立数据库时用的编码和php网页的编码不同 ...

  5. SQL删除重复数据方法

    例如: id           name         value 1               a                 pp 2               a           ...

  6. 作为一个web开发人员,哪些技术细节是在发布站点前你需要考虑到的

    前日在cnblogs上看到一遍文章<每个程序员都必读的12篇文章>,其中大多数是E文的. 先译其中一篇web相关的”每个程序员必知之WEB开发”. 原文: http://programme ...

  7. Linux/Unix笔记本

    Linux介绍 Linux入门——个人感想 Google怎么用linux 初入Linux Windows XP硬盘安装Ubuntu 12.04双系统图文详解 实例讲解虚拟机3种网络模式(桥接.nat. ...

  8. 鸟哥的linux私房菜---非常好的linux基础网址【转】

    转自:http://linux.vbird.org/linux_basic/0320bash.php 在 Linux 的環境下,如果你不懂 bash 是什麼,那麼其他的東西就不用學了!因為前面幾章我們 ...

  9. webApi FileReader

    https://developer.mozilla.org/en-US/docs/Web/API/FileReader https://github.com/node-file-api/FileRea ...

  10. Linux sar分析网卡流量

    yum install sysstat    sar -n { DEV | EDEV | NFS | NFSD | SOCK | ALL }    sar 提供六种不同的语法选项来显示网络信息.-n选 ...