SyncRequest.Builder.SetSyncAdapter(Account, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定此传输的颁发机构和帐户。
[Android.Runtime.Register("setSyncAdapter", "(Landroid/accounts/Account;Ljava/lang/String;)Landroid/content/SyncRequest$Builder;", "GetSetSyncAdapter_Landroid_accounts_Account_Ljava_lang_String_Handler")]
public virtual Android.Content.SyncRequest.Builder? SetSyncAdapter(Android.Accounts.Account? account, string? authority);
[<Android.Runtime.Register("setSyncAdapter", "(Landroid/accounts/Account;Ljava/lang/String;)Landroid/content/SyncRequest$Builder;", "GetSetSyncAdapter_Landroid_accounts_Account_Ljava_lang_String_Handler")>]
abstract member SetSyncAdapter : Android.Accounts.Account * string -> Android.Content.SyncRequest.Builder
override this.SetSyncAdapter : Android.Accounts.Account * string -> Android.Content.SyncRequest.Builder
参数
- account
- Account
要同步的帐户。可以为 null,除非这是定期同步,否则 ContentResolver 的验证将失败。 如果在不使用帐户的情况下执行同步,则
- authority
- String
标识要同步的内容提供程序的字符串。
返回
此生成器。
- 特性
注解
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。