public static final class ContactsContract.QuickContact extends Object
Contacts
entry.Modifier and Type | Field and Description |
---|---|
static String |
ACTION_QUICK_CONTACT
Action used to launch the system contacts application and bring up a QuickContact dialog
for the provided
Contacts entry. |
static String |
EXTRA_EXCLUDE_MIMES
Extra used to indicate a list of specific MIME-types to exclude and not display in the
QuickContacts dialog.
|
static String |
EXTRA_MODE
Extra used to specify size of QuickContacts.
|
static String |
EXTRA_PRIORITIZED_MIMETYPE
Extra used to specify which mimetype should be prioritized in the QuickContacts UI.
|
static String |
EXTRA_TARGET_RECT
Deprecated.
Use
Intent.setSourceBounds(Rect) instead. |
static int |
MODE_DEFAULT |
static int |
MODE_LARGE
Large QuickContact mode, includes actions and larger, card-like summary
of the
Contacts entry being shown. |
static int |
MODE_MEDIUM
Medium QuickContact mode, includes actions and light summary describing
the
Contacts entry being shown. |
static int |
MODE_SMALL
Small QuickContact mode, usually presented with minimal actions.
|
Constructor and Description |
---|
QuickContact() |
Modifier and Type | Method and Description |
---|---|
static Intent |
composeQuickContactsIntent(Context context,
Rect target,
Uri lookupUri,
int mode,
String[] excludeMimes)
Constructs the QuickContacts intent.
|
static Intent |
composeQuickContactsIntent(Context context,
View target,
Uri lookupUri,
int mode,
String[] excludeMimes)
Constructs the QuickContacts intent with a view's rect.
|
static Intent |
rebuildManagedQuickContactsIntent(String lookupKey,
long contactId,
boolean isContactIdIgnored,
long directoryId,
Intent originalIntent)
Constructs a QuickContacts intent based on an incoming intent for DevicePolicyManager
to strip off anything not necessary.
|
static void |
showQuickContact(Context context,
Rect target,
Uri lookupUri,
int mode,
String[] excludeMimes)
Trigger a dialog that lists the various methods of interacting with
the requested
Contacts entry. |
static void |
showQuickContact(Context context,
Rect target,
Uri lookupUri,
String[] excludeMimes,
String prioritizedMimeType)
Trigger a dialog that lists the various methods of interacting with
the requested
Contacts entry. |
static void |
showQuickContact(Context context,
View target,
Uri lookupUri,
int mode,
String[] excludeMimes)
Trigger a dialog that lists the various methods of interacting with
the requested
Contacts entry. |
static void |
showQuickContact(Context context,
View target,
Uri lookupUri,
String[] excludeMimes,
String prioritizedMimeType)
Trigger a dialog that lists the various methods of interacting with
the requested
Contacts entry. |
public static final String ACTION_QUICK_CONTACT
Contacts
entry.@Deprecated public static final String EXTRA_TARGET_RECT
Intent.setSourceBounds(Rect)
instead.public static final String EXTRA_MODE
MODE_SMALL
, MODE_MEDIUM
, or MODE_LARGE
.public static final String EXTRA_PRIORITIZED_MIMETYPE
ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE
can
cause phone numbers to be displayed more prominently in QuickContacts.public static final String EXTRA_EXCLUDE_MIMES
String
array.public static final int MODE_SMALL
public static final int MODE_MEDIUM
Contacts
entry being shown. This may include social
status and presence details.public static final int MODE_LARGE
Contacts
entry being shown. This may include detailed
information, such as a photo.public static final int MODE_DEFAULT
public static Intent composeQuickContactsIntent(Context context, View target, Uri lookupUri, int mode, String[] excludeMimes)
public static Intent composeQuickContactsIntent(Context context, Rect target, Uri lookupUri, int mode, String[] excludeMimes)
public static Intent rebuildManagedQuickContactsIntent(String lookupKey, long contactId, boolean isContactIdIgnored, long directoryId, Intent originalIntent)
public static void showQuickContact(Context context, View target, Uri lookupUri, int mode, String[] excludeMimes)
Contacts
entry. This may be based on available
ContactsContract.Data
rows under that contact, and may also
include social status and presence details.context
- The parent Context
that may be used as the
parent for this dialog.target
- 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
- A ContactsContract.Contacts.CONTENT_LOOKUP_URI
style
Uri
that describes a specific contact to feature
in this dialog. A work lookup uri is supported here,
see ContactsContract.CommonDataKinds.Email.ENTERPRISE_CONTENT_LOOKUP_URI
and
ContactsContract.PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI
.mode
- Any of MODE_SMALL
, MODE_MEDIUM
, or
MODE_LARGE
, indicating the desired dialog size,
when supported.excludeMimes
- Optional list of ContactsContract.DataColumns.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.public static void showQuickContact(Context context, Rect target, Uri lookupUri, int mode, String[] excludeMimes)
Contacts
entry. This may be based on available
ContactsContract.Data
rows under that contact, and may also
include social status and presence details.context
- The parent Context
that may be used as the
parent for this dialog.target
- 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
- A
ContactsContract.Contacts.CONTENT_LOOKUP_URI
style
Uri
that describes a specific contact to feature
in this dialog. A work lookup uri is supported here,
see ContactsContract.CommonDataKinds.Email.ENTERPRISE_CONTENT_LOOKUP_URI
and
ContactsContract.PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI
.mode
- Any of MODE_SMALL
, MODE_MEDIUM
, or
MODE_LARGE
, indicating the desired dialog size,
when supported.excludeMimes
- Optional list of ContactsContract.DataColumns.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.public static void showQuickContact(Context context, View target, Uri lookupUri, String[] excludeMimes, String prioritizedMimeType)
Contacts
entry. This may be based on available
ContactsContract.Data
rows under that contact, and may also
include social status and presence details.context
- The parent Context
that may be used as the
parent for this dialog.target
- 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
- A
ContactsContract.Contacts.CONTENT_LOOKUP_URI
style
Uri
that describes a specific contact to feature
in this dialog. A work lookup uri is supported here,
see ContactsContract.CommonDataKinds.Email.ENTERPRISE_CONTENT_LOOKUP_URI
and
ContactsContract.PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI
.excludeMimes
- Optional list of ContactsContract.DataColumns.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
- This mimetype should be prioritized in the QuickContacts UI.
For example, passing the value
ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE
can cause phone numbers to be
displayed more prominently in QuickContacts.public static void showQuickContact(Context context, Rect target, Uri lookupUri, String[] excludeMimes, String prioritizedMimeType)
Contacts
entry. This may be based on available
ContactsContract.Data
rows under that contact, and may also
include social status and presence details.context
- The parent Context
that may be used as the
parent for this dialog.target
- 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
- A
ContactsContract.Contacts.CONTENT_LOOKUP_URI
style
Uri
that describes a specific contact to feature
in this dialog. A work lookup uri is supported here,
see ContactsContract.CommonDataKinds.Email.ENTERPRISE_CONTENT_LOOKUP_URI
and
ContactsContract.PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI
.excludeMimes
- Optional list of ContactsContract.DataColumns.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
- This mimetype should be prioritized in the QuickContacts UI.
For example, passing the value
ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE
can cause phone numbers to be
displayed more prominently in QuickContacts.