IT. Expert System.

Android Reference

ContactsContract


android.provider

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.

    Overview

    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

      • AUTHORITY_URI

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

        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://com.android.contacts/data/emails/filter/acme?directory=3
        See Also:
        Constant Field Values
      • LIMIT_PARAM_KEY

        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
      • PRIMARY_ACCOUNT_NAME

        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
      • STREQUENT_PHONE_ONLY

        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
      • DEFERRED_SNIPPETING

        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
      • DEFERRED_SNIPPETING_QUERY

        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.
        Parameters:
        id - The ID to check.
        Returns:
        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.
        Parameters:
        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.
        Returns:
        The computed snippet, or null if the snippet could not be computed or should not be shown.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

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

License.
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: 500 / . Delta: 0.02918 с