Added in API level 5

QuickContact


class QuickContact
kotlin.Any
   ↳ android.provider.ContactsContract.QuickContact

Helper methods to display QuickContact dialogs that display all the information belonging to a specific Contacts entry.

Summary

Constants
static String

Action used to launch the system contacts application and bring up a QuickContact dialog for the provided Contacts entry.

static String

Extra used to indicate a list of specific MIME-types to exclude and not display in the QuickContacts dialog.

static String

Extra used to specify size of QuickContacts.

static String

Extra used to specify which mimetype should be prioritized in the QuickContacts UI.

static Int

Large QuickContact mode, includes actions and larger, card-like summary of the Contacts entry being shown.

static Int

Medium QuickContact mode, includes actions and light summary describing the Contacts entry being shown.

static Int

Small QuickContact mode, usually presented with minimal actions.

Public constructors

Public methods
static Unit
showQuickContact(context: Context!, target: Rect!, lookupUri: Uri!, mode: Int, excludeMimes: Array<String!>!)

Trigger a dialog that lists the various methods of interacting with the requested Contacts entry.

static Unit
showQuickContact(context: Context!, target: Rect!, lookupUri: Uri!, excludeMimes: Array<String!>!, prioritizedMimeType: String!)

Trigger a dialog that lists the various methods of interacting with the requested Contacts entry.

static Unit
showQuickContact(context: Context!, target: View!, lookupUri: Uri!, mode: Int, excludeMimes: Array<String!>!)

Trigger a dialog that lists the various methods of interacting with the requested Contacts entry.

static Unit
showQuickContact(context: Context!, target: View!, lookupUri: Uri!, excludeMimes: Array<String!>!, prioritizedMimeType: String!)

Trigger a dialog that lists the various methods of interacting with the requested Contacts entry.

Constants

ACTION_QUICK_CONTACT

Added in API level 21
static val ACTION_QUICK_CONTACT: String

Action used to launch the system contacts application and bring up a QuickContact dialog for the provided Contacts entry.

Value: "android.provider.action.QUICK_CONTACT"

EXTRA_EXCLUDE_MIMES

Added in API level 21
static val EXTRA_EXCLUDE_MIMES: String

Extra used to indicate a list of specific MIME-types to exclude and not display in the QuickContacts dialog. Stored as a String array.

Value: "android.provider.extra.EXCLUDE_MIMES"

EXTRA_MODE

Added in API level 23
static val EXTRA_MODE: String

Extra used to specify size of QuickContacts. Not all implementations of QuickContacts will respect this extra's value. One of MODE_SMALL, MODE_MEDIUM, or MODE_LARGE.

Value: "android.provider.extra.MODE"

EXTRA_PRIORITIZED_MIMETYPE

Added in API level 23
static val EXTRA_PRIORITIZED_MIMETYPE: String

Extra used to specify which mimetype should be prioritized in the QuickContacts UI. For example, passing the value CommonDataKinds.Phone#CONTENT_ITEM_TYPE can cause phone numbers to be displayed more prominently in QuickContacts.

Value: "android.provider.extra.PRIORITIZED_MIMETYPE"

MODE_LARGE

Added in API level 5
static val MODE_LARGE: Int

Large QuickContact mode, includes actions and larger, card-like summary of the Contacts entry being shown. This may include detailed information, such as a photo.

Value: 3

MODE_MEDIUM

Added in API level 5
static val MODE_MEDIUM: Int

Medium QuickContact mode, includes actions and light summary describing the Contacts entry being shown. This may include social status and presence details.

Value: 2

MODE_SMALL

Added in API level 5
static val MODE_SMALL: Int

Small QuickContact mode, usually presented with minimal actions.

Value: 1

Public constructors

QuickContact

QuickContact()

Public methods

showQuickContact

Added in API level 5
static fun showQuickContact(
    context: Context!,
    target: Rect!,
    lookupUri: Uri!,
    mode: Int,
    excludeMimes: Array<String!>!
): Unit

Trigger a dialog that lists the various methods of interacting with the requested Contacts entry. This may be based on available ContactsContract.Data rows under that contact, and may also include social status and presence details.

Parameters
context Context!: The parent Context that may be used as the parent for this dialog.
target Rect!: Specific Rect that this dialog should be centered around, in screen coordinates. In particular, if the dialog has a "callout" arrow, it will be pointed and centered around this Rect. If you are running at a non-native density, you need to manually adjust using DisplayMetrics.density before calling.
lookupUri Uri!: A ContactsContract.Contacts.CONTENT_LOOKUP_URI style Uri that describes a specific contact to feature in this dialog. A managed profile lookup uri is supported here, see CommonDataKinds.Email#ENTERPRISE_CONTENT_LOOKUP_URI and PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI.
mode Int: Any of MODE_SMALL, MODE_MEDIUM, or MODE_LARGE, indicating the desired dialog size, when supported.
excludeMimes Array<String!>!: Optional list of Data.MIMETYPE MIME-types to exclude when showing this dialog. For example, when already viewing the contact details card, this can be used to omit the details entry from the dialog.

showQuickContact

Added in API level 23
static fun showQuickContact(
    context: Context!,
    target: Rect!,
    lookupUri: Uri!,
    excludeMimes: Array<String!>!,
    prioritizedMimeType: String!
): Unit

Trigger a dialog that lists the various methods of interacting with the requested Contacts entry. This may be based on available ContactsContract.Data rows under that contact, and may also include social status and presence details.

Parameters
context Context!: The parent Context that may be used as the parent for this dialog.
target Rect!: Specific Rect that this dialog should be centered around, in screen coordinates. In particular, if the dialog has a "callout" arrow, it will be pointed and centered around this Rect. If you are running at a non-native density, you need to manually adjust using DisplayMetrics.density before calling.
lookupUri Uri!: A ContactsContract.Contacts.CONTENT_LOOKUP_URI style Uri that describes a specific contact to feature in this dialog. A managed profile lookup uri is supported here, see CommonDataKinds.Email#ENTERPRISE_CONTENT_LOOKUP_URI and PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI.
excludeMimes Array<String!>!: Optional list of Data.MIMETYPE MIME-types to exclude when showing this dialog. For example, when already viewing the contact details card, this can be used to omit the details entry from the dialog.
prioritizedMimeType String!: This mimetype should be prioritized in the QuickContacts UI. For example, passing the value CommonDataKinds.Phone#CONTENT_ITEM_TYPE can cause phone numbers to be displayed more prominently in QuickContacts.

showQuickContact

Added in API level 5
static fun showQuickContact(
    context: Context!,
    target: View!,
    lookupUri: Uri!,
    mode: Int,
    excludeMimes: Array<String!>!
): Unit

Trigger a dialog that lists the various methods of interacting with the requested Contacts entry. This may be based on available ContactsContract.Data rows under that contact, and may also include social status and presence details.

Parameters
context Context!: The parent Context that may be used as the parent for this dialog.
target View!: Specific View from your layout that this dialog should be centered around. In particular, if the dialog has a "callout" arrow, it will be pointed and centered around this View.
lookupUri Uri!: A ContactsContract.Contacts.CONTENT_LOOKUP_URI style Uri that describes a specific contact to feature in this dialog. A managed profile lookup uri is supported here, see CommonDataKinds.Email#ENTERPRISE_CONTENT_LOOKUP_URI and PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI.
mode Int: Any of MODE_SMALL, MODE_MEDIUM, or MODE_LARGE, indicating the desired dialog size, when supported.
excludeMimes Array<String!>!: Optional list of Data.MIMETYPE MIME-types to exclude when showing this dialog. For example, when already viewing the contact details card, this can be used to omit the details entry from the dialog.

showQuickContact

Added in API level 23
static fun showQuickContact(
    context: Context!,
    target: View!,
    lookupUri: Uri!,
    excludeMimes: Array<String!>!,
    prioritizedMimeType: String!
): Unit

Trigger a dialog that lists the various methods of interacting with the requested Contacts entry. This may be based on available ContactsContract.Data rows under that contact, and may also include social status and presence details.

Parameters
context Context!: The parent Context that may be used as the parent for this dialog.
target View!: Specific View from your layout that this dialog should be centered around. In particular, if the dialog has a "callout" arrow, it will be pointed and centered around this View.
lookupUri Uri!: A ContactsContract.Contacts.CONTENT_LOOKUP_URI style Uri that describes a specific contact to feature in this dialog. A managed profile lookup uri is supported here, see CommonDataKinds.Email#ENTERPRISE_CONTENT_LOOKUP_URI and PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI.
excludeMimes Array<String!>!: Optional list of Data.MIMETYPE MIME-types to exclude when showing this dialog. For example, when already viewing the contact details card, this can be used to omit the details entry from the dialog.
prioritizedMimeType String!: This mimetype should be prioritized in the QuickContacts UI. For example, passing the value CommonDataKinds.Phone#CONTENT_ITEM_TYPE can cause phone numbers to be displayed more prominently in QuickContacts.