NotificationManager.RemoveAutomaticZenRule(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
删除具有给定 ID 的自动 zen 规则。
[Android.Runtime.Register("removeAutomaticZenRule", "(Ljava/lang/String;)Z", "GetRemoveAutomaticZenRule_Ljava_lang_String_Handler", ApiSince=24)]
public virtual bool RemoveAutomaticZenRule(string? id);
[<Android.Runtime.Register("removeAutomaticZenRule", "(Ljava/lang/String;)Z", "GetRemoveAutomaticZenRule_Ljava_lang_String_Handler", ApiSince=24)>]
abstract member RemoveAutomaticZenRule : string -> bool
override this.RemoveAutomaticZenRule : string -> bool
参数
- id
- String
字符串:要删除的规则的 ID。
返回
规则是否已成功删除。
- 特性
注解
删除具有给定 ID 的自动 zen 规则。如果未向此包授予策略访问权限,则引发 SecurityException。 请参阅 isNotificationPolicyAccessGranted()。 调用方只能删除他们拥有的规则。 请参阅 AutomaticZenRule.getOwner。
Android 参考。android.app.NotificationManager.removeAutomaticZenRule
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。