AccountManager.HasFeatures Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Finds out whether a particular account has all the specified features.
[Android.Runtime.Register("hasFeatures", "(Landroid/accounts/Account;[Ljava/lang/String;Landroid/accounts/AccountManagerCallback;Landroid/os/Handler;)Landroid/accounts/AccountManagerFuture;", "GetHasFeatures_Landroid_accounts_Account_arrayLjava_lang_String_Landroid_accounts_AccountManagerCallback_Landroid_os_Handler_Handler")]
public virtual Android.Accounts.IAccountManagerFuture? HasFeatures (Android.Accounts.Account? account, string[]? features, Android.Accounts.IAccountManagerCallback? callback, Android.OS.Handler? handler);
[<Android.Runtime.Register("hasFeatures", "(Landroid/accounts/Account;[Ljava/lang/String;Landroid/accounts/AccountManagerCallback;Landroid/os/Handler;)Landroid/accounts/AccountManagerFuture;", "GetHasFeatures_Landroid_accounts_Account_arrayLjava_lang_String_Landroid_accounts_AccountManagerCallback_Landroid_os_Handler_Handler")>]
abstract member HasFeatures : Android.Accounts.Account * string[] * Android.Accounts.IAccountManagerCallback * Android.OS.Handler -> Android.Accounts.IAccountManagerFuture
override this.HasFeatures : Android.Accounts.Account * string[] * Android.Accounts.IAccountManagerCallback * Android.OS.Handler -> Android.Accounts.IAccountManagerFuture
Parameters
- account
- Account
The Account
to test
- features
- String[]
An array of the account features to check
- callback
- IAccountManagerCallback
Callback to invoke when the request completes, null for no callback
- handler
- Handler
Handler
identifying the callback thread, null for the main thread
Returns
An AccountManagerFuture
which resolves to a Boolean, true if the account
exists and has all of the specified features.
- Attributes
Remarks
Finds out whether a particular account has all the specified features. Account features are authenticator-specific string tokens identifying boolean account properties. For example, features are used to tell whether Google accounts have a particular service (such as Google Calendar or Google Talk) enabled. The feature names and their meanings are published somewhere associated with the authenticator in question.
This method may be called from any thread, but the returned AccountManagerFuture
must not be used on the main thread.
If caller target API level is below android.os.Build.VERSION_CODES#O
, it is required to hold the permission android.Manifest.permission#GET_ACCOUNTS
or have a signature match with the AbstractAccountAuthenticator that manages the account.
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.