Skip to main content

AndroidNotification

Kindclass
Packageandroid.platform
Full nameandroid.platform.AndroidNotification
Sourcesource/android/platform/AndroidNotification.hx

Native Android notifications. The media (MediaStyle) notification is managed by AndroidMedia; this module covers simple status notifications.

Public methods​

notify​

static function notify(id:Int, title:String, text:String):Void

Posts a simple notification on the engine's general channel. On Android 13+ the user must have granted POST_NOTIFICATIONS (see requestPermission).

ParameterTypeDefault
idInt—
titleString—
textString—

View source

cancel​

static function cancel(id:Int):Void
ParameterTypeDefault
idInt—

View source

requestPermission​

static function requestPermission():Void

Requests the POST_NOTIFICATIONS runtime permission (Android 13+).

View source

Internals​

Private / internal members
FieldTypeStatic
_notifySimpleDynamicyes
_cancelNotificationDynamicyes
_requestNotificationPermissionDynamicyes
Method
static function notifySimple_jni(id:Int, title:String, text:String):Void
static function cancelNotification_jni(id:Int):Void
static function requestNotificationPermission_jni():Void