NotificationManager.Notify 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| Notify(Int32, Notification) |
发布要显示在状态栏中的通知。 |
| Notify(String, Int32, Notification) |
发布要显示在状态栏中的通知。 |
Notify(Int32, Notification)
发布要显示在状态栏中的通知。
[Android.Runtime.Register("notify", "(ILandroid/app/Notification;)V", "GetNotify_ILandroid_app_Notification_Handler")]
public virtual void Notify(int id, Android.App.Notification? notification);
[<Android.Runtime.Register("notify", "(ILandroid/app/Notification;)V", "GetNotify_ILandroid_app_Notification_Handler")>]
override this.Notify : int * Android.App.Notification -> unit
参数
- id
- Int32
int:应用程序中此通知唯一的标识符。
- notification
- Notification
通知:描述向用户显示的内容的通知对象。 不得为 null。
- 特性
注解
发布要显示在状态栏中的通知。 如果应用程序已发布具有相同 ID 的通知,但尚未取消,则会将其替换为更新的信息。
Android 参考。android.app.NotificationManager.notify
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
Notify(String, Int32, Notification)
发布要显示在状态栏中的通知。
[Android.Runtime.Register("notify", "(Ljava/lang/String;ILandroid/app/Notification;)V", "GetNotify_Ljava_lang_String_ILandroid_app_Notification_Handler")]
public virtual void Notify(string? tag, int id, Android.App.Notification? notification);
[<Android.Runtime.Register("notify", "(Ljava/lang/String;ILandroid/app/Notification;)V", "GetNotify_Ljava_lang_String_ILandroid_app_Notification_Handler")>]
override this.Notify : string * int * Android.App.Notification -> unit
参数
- tag
- String
字符串:此通知的字符串标识符。 可以为 null。
- id
- Int32
int:此通知的标识符。 对(标记,ID)在应用程序中必须是唯一的。
- notification
- Notification
通知:描述向用户显示的内容的通知对象。 不得为 null。
- 特性
注解
发布要显示在状态栏中的通知。 如果应用程序已发布具有相同标记和 ID 的通知,但尚未取消,则会将其替换为更新的信息。 将向所有侦听器服务授予Intent.FLAG_GRANT_READ_URI_PERMISSION对此通知上提供的任何 URI 的访问权限,或者此通知发布到使用 Context.grantUriPermission(String,Uri,int) 的 NotificationChannel。 当通知取消时,将撤销权限,或者可以使用 Context.revokeUriPermission(Uri,int)撤消权限。
Android 参考。android.app.NotificationManager.notify
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。