Android content providers'-content providers' BASICS (providers' data types)

Source: Internet
Author: User

The content provider can provide many different data types. The user dictionary provider only provides the text type, but also provides the following types:

1. Integer

2. Long Integer (long)

3. Floating Point

4. Long floating point (double)

Another type of data frequently used by the provider is the Binary Large Object (BLOB) implemented using a 64 kB array ). You can view the valid data types by viewing the "get" method of the cursor class.

The data type of each column in The provisioner is usually listed in its document. The data type of the user dictionary provider is listed in the reference document of its contract class userdictionary. Words (the concept of the Contract class is introduced in the "contract class" section ). You can also call cursor. GetType () to determine the data type.

The provider also maintains the MIME data type information defined in each content Uri. You can use MIME type information to determine the applicationProgramWhether the data provided by the provider can be processed, or the MIME type can be used to select the processing type. The MIME type is usually used when you use a provider that contains complex data structures or files. For example, the contactscontract. data table in the contact list provider uses the MIME type to identify the type of the contact list data stored in each row. Call contentresolver. GetType () to obtain a content URI corresponding to the MIME type.

The MIME type reference section describes the standard and custom MIME type syntax.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.