NotificationManager.NotifyAsPackage Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Invia una notifica come pacchetto specificato da visualizzare nella barra di stato.
[Android.Runtime.Register("notifyAsPackage", "(Ljava/lang/String;Ljava/lang/String;ILandroid/app/Notification;)V", "GetNotifyAsPackage_Ljava_lang_String_Ljava_lang_String_ILandroid_app_Notification_Handler", ApiSince=29)]
public virtual void NotifyAsPackage(string targetPackage, string? tag, int id, Android.App.Notification notification);
[<Android.Runtime.Register("notifyAsPackage", "(Ljava/lang/String;Ljava/lang/String;ILandroid/app/Notification;)V", "GetNotifyAsPackage_Ljava_lang_String_Ljava_lang_String_ILandroid_app_Notification_Handler", ApiSince=29)>]
abstract member NotifyAsPackage : string * string * int * Android.App.Notification -> unit
override this.NotifyAsPackage : string * string * int * Android.App.Notification -> unit
Parametri
- targetPackage
- String
Pacchetto in cui inviare la notifica. Il pacchetto deve avere concesso l'accesso per inviare notifiche per conto dell'utente con #setNotificationDelegate(String).
- tag
- String
Identificatore di stringa per questa notifica. Può essere null.
- id
- Int32
Identificatore per questa notifica. La coppia (tag, ID) deve essere univoca all'interno dell'applicazione.
- notification
- Notification
Oggetto Notification che descrive cosa mostrare all'utente. Non deve essere null.
- Attributi
Commenti
Invia una notifica come pacchetto specificato da visualizzare nella barra di stato. Se una notifica con lo stesso tag e ID è già stata pubblicata per il pacchetto e non è ancora stata annullata, verrà sostituita dalle informazioni aggiornate.
All will be granted access to any Uri uris provided on this notification or the notification is posted to using .All android.service.notification.NotificationListenerService listener services will be granted access to Intent#FLAG_GRANT_READ_URI_PERMISSION any provided on this notification or the NotificationChannel notification is posted to using Context#grantUriPermission(String, Uri, int). L'autorizzazione verrà revocata quando la notifica viene annullata oppure è possibile revocare le autorizzazioni con Context#revokeUriPermission(Uri, int).
Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dalla e usati in base ai termini descritti in Creative License 2.5 Attribution License.