IT. Expert System.

Android Reference



Class ContactsContract

  • public final class ContactsContract
    extends Object

    The contract between the contacts provider and applications. Contains definitions for the supported URIs and columns. These APIs supersede Contacts.


    ContactsContract defines an extensible database of contact-related information. Contact information is stored in a three-tier data model:

    • A row in the ContactsContract.Contacts.Data table can store any kind of personal data, such as a phone number or email addresses. The set of data kinds that can be stored in this table is open-ended. There is a predefined set of common kinds, but any application can add its own data kinds.
    • A row in the ContactsContract.RawContacts table represents a set of data describing a person and associated with a single account (for example, one of the user's Gmail accounts).
    • A row in the Contacts table represents an aggregate of one or more RawContacts presumably describing the same person. When data in or associated with the RawContacts table is changed, the affected aggregate contacts are updated as necessary.

    Other tables include:

    • Field Detail


        public static final Uri AUTHORITY_URI
        A content:// style uri to the authority for the contacts provider

        public static final String DIRECTORY_PARAM_KEY
        Query parameter that should be used by the client to access a specific ContactsContract.Directory. The parameter value should be the _ID of the corresponding directory, e.g. content://
        See Also:
        Constant Field Values

        public static final String LIMIT_PARAM_KEY
        A query parameter that limits the number of results returned. The parameter value should be an integer.
        See Also:
        Constant Field Values

        public static final String PRIMARY_ACCOUNT_NAME
        A query parameter specifing a primary account. This parameter should be used with PRIMARY_ACCOUNT_TYPE. The contacts provider handling a query may rely on this information to optimize its query results. For example, in an email composition screen, its implementation can specify an account when obtaining possible recipients, letting the provider know which account is selected during the composition. The provider may use the "primary account" information to optimize the search result.
        See Also:
        Constant Field Values

        public static final String STREQUENT_PHONE_ONLY
        A boolean parameter for Contacts#CONTENT_STREQUENT_URI and Contacts#CONTENT_STREQUENT_FILTER_URI, which requires the ContactsProvider to return only phone-related results. For example, frequently contacted person list should include persons contacted via phone (not email, sms, etc.)
        See Also:
        Constant Field Values

        public static final String DEFERRED_SNIPPETING
        A key to a boolean in the "extras" bundle of the cursor. The boolean indicates that the provider did not create a snippet and that the client asking for the snippet should do it (true means the snippeting was deferred to the client).
        See Also:
        Constant Field Values

        public static final String DEFERRED_SNIPPETING_QUERY
        Key to retrieve the original query on the client side.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ContactsContract

        public ContactsContract()
    • Method Detail

      • isProfileId

        public static boolean isProfileId(long id)
        This method can be used to identify whether the given ID is associated with profile data. It does not necessarily indicate that the ID is tied to valid data, merely that accessing data using this ID will result in profile access checks and will only return data from the profile.
        id - The ID to check.
        Whether the ID is associated with profile data.
      • snippetize

        public static String snippetize(String content,
                        String displayName,
                        String query,
                        char snippetStartMatch,
                        char snippetEndMatch,
                        String snippetEllipsis,
                        int snippetMaxTokens)
        Creates a snippet out of the given content that matches the given query.
        content - - The content to use to compute the snippet.
        displayName - - Display name for the contact - if this already contains the search content, no snippet should be shown.
        query - - String to search for in the content.
        snippetStartMatch - - Marks the start of the matching string in the snippet.
        snippetEndMatch - - Marks the end of the matching string in the snippet.
        snippetEllipsis - - Ellipsis string appended to the end of the snippet (if too long).
        snippetMaxTokens - - Maximum number of words from the snippet that will be displayed.
        The computed snippet, or null if the snippet could not be computed or should not be shown.


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 172 / 158873315. Delta: 0.04991 с