Language

ContactsContract.Settings.GetAccountAttributes Method

Definition

Returns the attributes of a given account as a 64-bit bitmask.

[Android.Runtime.Register("getAccountAttributes", "(Landroid/content/ContentResolver;Landroid/accounts/Account;Ljava/lang/String;)J", "", ApiSince=37)]
public static long GetAccountAttributes(Android.Content.ContentResolver resolver, Android.Accounts.Account? account, string? dataSet);
[<Android.Runtime.Register("getAccountAttributes", "(Landroid/content/ContentResolver;Landroid/accounts/Account;Ljava/lang/String;)J", "", ApiSince=37)>]
static member GetAccountAttributes : Android.Content.ContentResolver * Android.Accounts.Account * string -> int64

Parameters

resolver
ContentResolver

The ContentResolver to use for the query. This value cannot be null.

account
Account

The account to query. If null, this queries the attributes of the local, device-only account (where both account_name and account_type are null).

dataSet
String

The data set specific to the account type, which may be null.

Returns

A long representing the attributes bitmask. Value is either 0 or a combination of the following: ContactsContract.Settings.AccountAttributes.ATTRIBUTE_DATA_ORIGIN_LOCAL; ContactsContract.Settings.AccountAttributes.ATTRIBUTE_DATA_ORIGIN_SIM; ContactsContract.Settings.AccountAttributes.ATTRIBUTE_DATA_ORIGIN_CLOUD; ContactsContract.Settings.AccountAttributes.ATTRIBUTE_SYNC_MODE_UP_SYNC; ContactsContract.Settings.AccountAttributes.ATTRIBUTE_SYNC_MODE_DOWN_SYNC; ContactsContract.Settings.AccountAttributes.ATTRIBUTE_DATA_TYPE_CUSTOM_DECLARED

Attributes

Remarks

Returns the attributes of a given account as a 64-bit bitmask.

A return value of 0L indicates the account exists but has no specific attributes enabled or set. Requires Manifest.permission.READ_CONTACTS

Android reference for android.provider.ContactsContract.Settings.getAccountAttributes.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to