ContactsContract.Groups


public static final class ContactsContract.Groups
extends Object implements BaseColumns, ContactsContract.GroupsColumns, ContactsContract.SyncColumns

java.lang.Object
   ↳ android.provider.ContactsContract.Groups


Constants for the groups table. Only per-account groups are supported.

Columns

#
Groups
long BaseColumns._ID read-only Row ID. Sync adapter should try to preserve row IDs during updates. In other words, it would be a really bad idea to delete and reinsert a group. A sync adapter should always do an update instead.
String ContactsContract.GroupsColumns.DATA_SET read/write-once

The data set within the account that this group belongs to. This allows multiple sync adapters for the same account type to distinguish between each others' group data. The combination of ContactsContract.SyncColumns.ACCOUNT_TYPE, ContactsContract.SyncColumns.ACCOUNT_NAME, and ContactsContract.GroupsColumns.DATA_SET identifies a set of data that is associated with a single sync adapter.

This is empty by default, and is completely optional. It only needs to be populated if multiple sync adapters are entering distinct data for the same account type and account name.

It should be set at the time the group is inserted and never changed afterwards.

String ContactsContract.GroupsColumns.TITLE read/write The display title of this group.
String ContactsContract.GroupsColumns.NOTES read/write Notes about the group.
String ContactsContract.GroupsColumns.SYSTEM_ID read/write The ID of this group if it is a System Group, i.e. a group that has a special meaning to the sync adapter, null otherwise.
int ContactsContract.GroupsColumns.SUMMARY_COUNT read-only The total number of Contacts that have CommonDataKinds.GroupMembership in this group. Read-only value that is only present when querying Groups.CONTENT_SUMMARY_URI.
int ContactsContract.GroupsColumns.SUMMARY_WITH_PHONES read-only The total number of Contacts that have both CommonDataKinds.GroupMembership in this group, and also have phone numbers. Read-only value that is only present when querying Groups.CONTENT_SUMMARY_URI.
int ContactsContract.GroupsColumns.GROUP_VISIBLE read-only Flag indicating if the contacts belonging to this group should be visible in any user interface. Allowed values: 0 and 1.
int ContactsContract.GroupsColumns.DELETED read/write The "deleted" flag: "0" by default, "1" if the row has been marked for deletion. When ContentResolver.delete(Uri, Bundle) is called on a group, it is marked for deletion. The sync adaptor deletes the group on the server and then calls ContactResolver.delete once more, this time setting the the ContactsContract.CALLER_IS_SYNCADAPTER query parameter to finalize the data removal.
int ContactsContract.GroupsColumns.SHOULD_SYNC read/write Whether this group should be synced if the SYNC_EVERYTHING settings is false for this group's account.

Summary

Constants

String CONTENT_ITEM_TYPE

The MIME type of a single group.

String CONTENT_TYPE

The MIME type of a directory of groups.

Inherited constants

String _COUNT

The count of rows in a directory.

String _ID

The unique ID for a row.

String AUTO_ADD

Any newly created contacts will automatically be added to groups that have this flag set to true.

String DATA_SET

The data set within the account that this group belongs to.

String DELETED

The "deleted" flag: "0" by default, "1" if the row has been marked for deletion.

String FAVORITES

When a contacts is marked as a favorites it will be automatically added to the groups that have this flag set, and when it is removed from favorites it will be removed from these groups.

String GROUP_IS_READ_ONLY

The "read-only" flag: "0" by default, "1" if the row cannot be modified or deleted except by a sync adapter.

String GROUP_VISIBLE

Flag indicating if the contacts belonging to this group should be visible in any user interface.

String NOTES

Notes about the group.

String RES_PACKAGE

The package name to use when creating Resources objects for this group.

String SHOULD_SYNC

Whether this group should be synced if the SYNC_EVERYTHING settings is false for this group's account.

String SUMMARY_COUNT

The total number of Contacts that have CommonDataKinds.GroupMembership in this group.

String SUMMARY_WITH_PHONES

The total number of Contacts that have both CommonDataKinds.GroupMembership in this group, and also have phone numbers.

String SYSTEM_ID

The ID of this group if it is a System Group, i.e.

String TITLE

The display title of this group.

String TITLE_RES

The display title of this group to load as a resource from RES_PACKAGE, which may be localized.

String ACCOUNT_NAME

The name of the account instance to which this row belongs, which when paired with ACCOUNT_TYPE identifies a specific account.

String ACCOUNT_TYPE

The type of account to which this row belongs, which when paired with ACCOUNT_NAME identifies a specific account.

String DIRTY

Flag indicating that VERSION has changed, and this row needs to be synchronized by its owning account.

String SOURCE_ID

String that uniquely identifies this row to its source account.

String VERSION

Version number that is updated whenever this row or its related data changes.

String SYNC1

Generic column for use by sync adapters.

String SYNC2

Generic column for use by sync adapters.

String SYNC3

Generic column for use by sync adapters.

String SYNC4

Generic column for use by sync adapters.

Fields

public static final Uri CONTENT_SUMMARY_URI

The content:// style URI for this table joined with details data from ContactsContract.Data.

public static final Uri CONTENT_URI

The content:// style URI for this table

Public methods

static EntityIterator newEntityIterator(Cursor cursor)

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

CONTENT_ITEM_TYPE

Added in API level 5
public static final String CONTENT_ITEM_TYPE

The MIME type of a single group.

Constant Value: "vnd.android.cursor.item/group"

CONTENT_TYPE

Added in API level 5
public static final String CONTENT_TYPE

The MIME type of a directory of groups.

Constant Value: "vnd.android.cursor.dir/group"

Fields

CONTENT_SUMMARY_URI

Added in API level 5
public static final Uri CONTENT_SUMMARY_URI

The content:// style URI for this table joined with details data from ContactsContract.Data.

CONTENT_URI

Added in API level 5
public static final Uri CONTENT_URI

The content:// style URI for this table

Public methods

newEntityIterator

Added in API level 8
public static EntityIterator newEntityIterator (Cursor cursor)

Parameters
cursor Cursor

Returns
EntityIterator