Freigeben über


NotificationManager.CanNotifyAsPackage(String) Method

Definition

Returns whether you are allowed to post notifications on behalf of a given package, with #notifyAsPackage(String, String, int, Notification).

[Android.Runtime.Register("canNotifyAsPackage", "(Ljava/lang/String;)Z", "GetCanNotifyAsPackage_Ljava_lang_String_Handler", ApiSince=29)]
public virtual bool CanNotifyAsPackage (string pkg);
[<Android.Runtime.Register("canNotifyAsPackage", "(Ljava/lang/String;)Z", "GetCanNotifyAsPackage_Ljava_lang_String_Handler", ApiSince=29)>]
abstract member CanNotifyAsPackage : string -> bool
override this.CanNotifyAsPackage : string -> bool

Parameters

pkg
String

Returns

Attributes

Remarks

Returns whether you are allowed to post notifications on behalf of a given package, with #notifyAsPackage(String, String, int, Notification).

See #setNotificationDelegate(String).

Java documentation for android.app.NotificationManager.canNotifyAsPackage(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to