AccountManager.RemoveAccountExplicitly(Account) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
直接移除帳號。
[Android.Runtime.Register("removeAccountExplicitly", "(Landroid/accounts/Account;)Z", "GetRemoveAccountExplicitly_Landroid_accounts_Account_Handler", ApiSince=22)]
[Android.Runtime.RequiresPermission("android.permission.AUTHENTICATE_ACCOUNTS")]
public virtual bool RemoveAccountExplicitly(Android.Accounts.Account? account);
[<Android.Runtime.Register("removeAccountExplicitly", "(Landroid/accounts/Account;)Z", "GetRemoveAccountExplicitly_Landroid_accounts_Account_Handler", ApiSince=22)>]
[<Android.Runtime.RequiresPermission("android.permission.AUTHENTICATE_ACCOUNTS")>]
abstract member RemoveAccountExplicitly : Android.Accounts.Account -> bool
override this.RemoveAccountExplicitly : Android.Accounts.Account -> bool
參數
- account
- Account
刪除。Account
傳回
若帳號已成功刪除,則為 True;若帳號不存在、帳號為空,或發生其他錯誤,則為 False。
- 屬性
備註
直接移除帳號。 通常由驗證器使用,而非應用程式直接使用。 不會從伺服器刪除帳號。 驗證器可能有自己的政策來防止帳號刪除,這種情況下帳號不會被刪除。
從主執行緒呼叫此方法是安全的。
此方法要求呼叫者與管理指定帳號的驗證器有簽名匹配。
注意: 如果你的應用程式要在 API 22 級及以前運作,AUTHENTICATE_ACCOUNTS權限以及與帳號驗證器相同的 UID,是這些平台的必要條件。 請參閱 API 等級 22 的相關文件。
Java 文件 android.accounts.AccountManager.removeAccountExplicitly(android.accounts.Account)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。