# ContactsContract.SyncState

Added in[API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/provider/ContactsContract.SyncState#constants)\|[Inherited Constants](https://developer.android.com/reference/android/provider/ContactsContract.SyncState#inhconstants)\|[Fields](https://developer.android.com/reference/android/provider/ContactsContract.SyncState#lfields)\|[Methods](https://developer.android.com/reference/android/provider/ContactsContract.SyncState#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/provider/ContactsContract.SyncState#inhmethods)  

# ContactsContract.SyncState

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.SyncState "View this page in Kotlin")\|Java

`
public
static
final

class
ContactsContract.SyncState
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


implements

`[SyncStateContract.Columns](https://developer.android.com/reference/android/provider/SyncStateContract.Columns)`


`

|---|---------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.ContactsContract.SyncState |

<br />

*** ** * ** ***

A table provided for sync adapters to use for storing private sync state data for contacts.  
**See also:**

- [SyncStateContract](https://developer.android.com/reference/android/provider/SyncStateContract)

## Summary

|                                                                                             ### Constants                                                                                             ||
|--------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | [CONTENT_DIRECTORY](https://developer.android.com/reference/android/provider/ContactsContract.SyncState#CONTENT_DIRECTORY) <br /> |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ### Inherited constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From interface[android.provider.SyncStateContract.Columns](https://developer.android.com/reference/android/provider/SyncStateContract.Columns) |--------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://developer.android.com/reference/java/lang/String) | [ACCOUNT_NAME](https://developer.android.com/reference/android/provider/SyncStateContract.Columns#ACCOUNT_NAME) A reference to the name of the account to which this data belongs Type: STRING <br /> | | [String](https://developer.android.com/reference/java/lang/String) | [ACCOUNT_TYPE](https://developer.android.com/reference/android/provider/SyncStateContract.Columns#ACCOUNT_TYPE) A reference to the type of the account to which this data belongs Type: STRING <br /> | | [String](https://developer.android.com/reference/java/lang/String) | [DATA](https://developer.android.com/reference/android/provider/SyncStateContract.Columns#DATA) The sync data associated with this account.                                                           | |
| From interface[android.provider.BaseColumns](https://developer.android.com/reference/android/provider/BaseColumns) |--------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------| | [String](https://developer.android.com/reference/java/lang/String) | [_COUNT](https://developer.android.com/reference/android/provider/BaseColumns#_COUNT) The count of rows in a directory. | | [String](https://developer.android.com/reference/java/lang/String) | [_ID](https://developer.android.com/reference/android/provider/BaseColumns#_ID) The unique ID for a row.                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

|                                                                                                                  ### Fields                                                                                                                   ||
|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public static final `[Uri](https://developer.android.com/reference/android/net/Uri) | [CONTENT_URI](https://developer.android.com/reference/android/provider/ContactsContract.SyncState#CONTENT_URI) The content:// style URI for this table |

|                                                                                                                                                                                                                                                                        ### Public methods                                                                                                                                                                                                                                                                         ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static byte[]`                                                                                                                                        | ` `[get](https://developer.android.com/reference/android/provider/ContactsContract.SyncState#get(android.content.ContentProviderClient,%20android.accounts.Account))`(`[ContentProviderClient](https://developer.android.com/reference/android/content/ContentProviderClient)` provider, `[Account](https://developer.android.com/reference/android/accounts/Account)` account) `                        |
| ` static `[Pair](https://developer.android.com/reference/android/util/Pair)`<`[Uri](https://developer.android.com/reference/android/net/Uri)`, byte[]>` | ` `[getWithUri](https://developer.android.com/reference/android/provider/ContactsContract.SyncState#getWithUri(android.content.ContentProviderClient,%20android.accounts.Account))`(`[ContentProviderClient](https://developer.android.com/reference/android/content/ContentProviderClient)` provider, `[Account](https://developer.android.com/reference/android/accounts/Account)` account) `          |
| ` static `[ContentProviderOperation](https://developer.android.com/reference/android/content/ContentProviderOperation)                                  | ` `[newSetOperation](https://developer.android.com/reference/android/provider/ContactsContract.SyncState#newSetOperation(android.accounts.Account,%20byte[]))`(`[Account](https://developer.android.com/reference/android/accounts/Account)` account, byte[] data) `                                                                                                                                     |
| ` static void`                                                                                                                                          | ` `[set](https://developer.android.com/reference/android/provider/ContactsContract.SyncState#set(android.content.ContentProviderClient,%20android.accounts.Account,%20byte[]))`(`[ContentProviderClient](https://developer.android.com/reference/android/content/ContentProviderClient)` provider, `[Account](https://developer.android.com/reference/android/accounts/Account)` account, byte[] data) ` |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(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](https://developer.android.com/reference/java/lang/Object#wait(long))`(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](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### CONTENT_DIRECTORY

Added in[API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final String CONTENT_DIRECTORY
```

<br />

<br />

Constant Value: "syncstate"

## Fields

### CONTENT_URI

Added in[API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final Uri CONTENT_URI
```

The content:// style URI for this table

<br />

## Public methods

### get

Added in[API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static byte[] get (ContentProviderClient provider, 
                Account account)
```

<br />

<br />

|                 Parameters                 ||
|------------|--------------------------------|
| `provider` | `ContentProviderClient` <br /> |
| `account`  | `Account` <br />               |

|     Returns      ||
|----------|--------|
| `byte[]` | <br /> |

|                                          Throws                                          ||
|---------------------------------------------------------------------------------------|---|
| [RemoteException](https://developer.android.com/reference/android/os/RemoteException) |   |

**See also:**

- [SyncStateContract.Helpers.get(ContentProviderClient, Uri, Account)](https://developer.android.com/reference/android/provider/SyncStateContract.Helpers#get(android.content.ContentProviderClient,%20android.net.Uri,%20android.accounts.Account))  

### getWithUri

Added in[API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static Pair<Uri, byte[]> getWithUri (ContentProviderClient provider, 
                Account account)
```

<br />

<br />

|                 Parameters                 ||
|------------|--------------------------------|
| `provider` | `ContentProviderClient` <br /> |
| `account`  | `Account` <br />               |

|                                                                        Returns                                                                        ||
|-----------------------------------------------------------------------------------------------------------------------------------------------|--------|
| [Pair](https://developer.android.com/reference/android/util/Pair)`<`[Uri](https://developer.android.com/reference/android/net/Uri)`, byte[]>` | <br /> |

|                                          Throws                                          ||
|---------------------------------------------------------------------------------------|---|
| [RemoteException](https://developer.android.com/reference/android/os/RemoteException) |   |

**See also:**

- [SyncStateContract.Helpers.get(ContentProviderClient, Uri, Account)](https://developer.android.com/reference/android/provider/SyncStateContract.Helpers#get(android.content.ContentProviderClient,%20android.net.Uri,%20android.accounts.Account))  

### newSetOperation

Added in[API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static ContentProviderOperation newSetOperation (Account account, 
                byte[] data)
```

<br />

<br />

|         Parameters          ||
|-----------|------------------|
| `account` | `Account` <br /> |
| `data`    | `byte` <br />    |

|                                                       Returns                                                        ||
|--------------------------------------------------------------------------------------------------------------|--------|
| [ContentProviderOperation](https://developer.android.com/reference/android/content/ContentProviderOperation) | <br /> |

**See also:**

- [SyncStateContract.Helpers.newSetOperation(Uri, Account, byte)](https://developer.android.com/reference/android/provider/SyncStateContract.Helpers#newSetOperation(android.net.Uri,%20android.accounts.Account,%20byte[]))  

### set

Added in[API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static void set (ContentProviderClient provider, 
                Account account, 
                byte[] data)
```

<br />

<br />

|                 Parameters                 ||
|------------|--------------------------------|
| `provider` | `ContentProviderClient` <br /> |
| `account`  | `Account` <br />               |
| `data`     | `byte` <br />                  |

|                                          Throws                                          ||
|---------------------------------------------------------------------------------------|---|
| [RemoteException](https://developer.android.com/reference/android/os/RemoteException) |   |

**See also:**

- [SyncStateContract.Helpers.set(ContentProviderClient, Uri, Account, byte)](https://developer.android.com/reference/android/provider/SyncStateContract.Helpers#set(android.content.ContentProviderClient,%20android.net.Uri,%20android.accounts.Account,%20byte[]))