Added in API level 5

Helpers


class Helpers
kotlin.Any
   ↳ android.provider.SyncStateContract.Helpers

Summary

Public constructors

Public methods
static ByteArray!
get(provider: ContentProviderClient!, uri: Uri!, account: Account!)

Get the sync state that is associated with the account or null.

static Pair<Uri!, ByteArray!>!
getWithUri(provider: ContentProviderClient!, uri: Uri!, account: Account!)

static Uri!
insert(provider: ContentProviderClient!, uri: Uri!, account: Account!, data: ByteArray!)

static ContentProviderOperation!
newSetOperation(uri: Uri!, account: Account!, data: ByteArray!)

Creates and returns a ContentProviderOperation that assigns the data array as the sync state for the given account.

static ContentProviderOperation!

Creates and returns a ContentProviderOperation that assigns the data array as the sync state for the given account.

static Unit
set(provider: ContentProviderClient!, uri: Uri!, account: Account!, data: ByteArray!)

Assigns the data array as the sync state for the given account.

static Unit
update(provider: ContentProviderClient!, uri: Uri!, data: ByteArray!)

Public constructors

Helpers

Helpers()

Public methods

get

Added in API level 5
static fun get(
    provider: ContentProviderClient!,
    uri: Uri!,
    account: Account!
): ByteArray!

Get the sync state that is associated with the account or null.

Parameters
provider ContentProviderClient!: the ContentProviderClient that is to be used to communicate with the android.content.ContentProvider that contains the sync state.
uri Uri!: the uri of the sync state
account Account!: the Account whose sync state should be returned
Return
ByteArray! the sync state or null if there is no sync state associated with the account
Exceptions
android.os.RemoteException if there is a failure communicating with the remote android.content.ContentProvider

getWithUri

Added in API level 5
static fun getWithUri(
    provider: ContentProviderClient!,
    uri: Uri!,
    account: Account!
): Pair<Uri!, ByteArray!>!

insert

Added in API level 5
static fun insert(
    provider: ContentProviderClient!,
    uri: Uri!,
    account: Account!,
    data: ByteArray!
): Uri!

newSetOperation

Added in API level 5
static fun newSetOperation(
    uri: Uri!,
    account: Account!,
    data: ByteArray!
): ContentProviderOperation!

Creates and returns a ContentProviderOperation that assigns the data array as the sync state for the given account.

Parameters
uri Uri!: the uri of the sync state
account Account!: the Account whose sync state should be set
data ByteArray!: the byte[] that contains the sync state
Return
ContentProviderOperation! the new ContentProviderOperation that assigns the data array as the account's sync state

newUpdateOperation

Added in API level 5
static fun newUpdateOperation(
    uri: Uri!,
    data: ByteArray!
): ContentProviderOperation!

Creates and returns a ContentProviderOperation that assigns the data array as the sync state for the given account.

Parameters
uri Uri!: the uri of the specific sync state to set
data ByteArray!: the byte[] that contains the sync state
Return
ContentProviderOperation! the new ContentProviderOperation that assigns the data array as the account's sync state

set

Added in API level 5
static fun set(
    provider: ContentProviderClient!,
    uri: Uri!,
    account: Account!,
    data: ByteArray!
): Unit

Assigns the data array as the sync state for the given account.

Parameters
provider ContentProviderClient!: the ContentProviderClient that is to be used to communicate with the android.content.ContentProvider that contains the sync state.
uri Uri!: the uri of the sync state
account Account!: the Account whose sync state should be set
data ByteArray!: the byte[] that contains the sync state
Exceptions
android.os.RemoteException if there is a failure communicating with the remote android.content.ContentProvider

update

Added in API level 5
static fun update(
    provider: ContentProviderClient!,
    uri: Uri!,
    data: ByteArray!
): Unit