語言

NotificationManager.Notify 方法

定義

多載

名稱 Description
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。

屬性

備註

請發布通知,顯示在狀態列中。 如果您的申請已經發布了相同識別碼的通知且尚未被取消,則該通知將被更新後的資訊取代。

Android 參考資料。android.app.NotificationManager.notify

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

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:此通知的識別碼。 這對(標籤、識別碼)必須在你的應用程式中是唯一的。

notification
Notification

通知:一個通知物件,描述要向使用者顯示的內容。 不得為 Null。

屬性

備註

會在狀態列中發布通知。 如果您的申請已經貼出相同標籤和識別碼的通知且尚未被取消,則會被更新後的資訊取代。 所有監聽服務將Intent.FLAG_GRANT_READ_URI_PERMISSION透過 Context.grantUriPermission(String,Uri,int) 存取本通知或通知頻道中提供的任何 URIS。 通知被取消時,權限會被撤銷,或者你可以用 Context.revokeUriPermission(Uri,int) 來撤銷權限。

Android 參考資料。android.app.NotificationManager.notify

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於