AndroidNotification
| Kind | class |
| Package | android.platform |
| Full name | android.platform.AndroidNotification |
| Source | source/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).
| Parameter | Type | Default |
|---|---|---|
id | Int | — |
title | String | — |
text | String | — |
cancel
static function cancel(id:Int):Void
| Parameter | Type | Default |
|---|---|---|
id | Int | — |
requestPermission
static function requestPermission():Void
Requests the POST_NOTIFICATIONS runtime permission (Android 13+).
Internals
Private / internal members
| Field | Type | Static |
|---|---|---|
_notifySimple | Dynamic | yes |
_cancelNotification | Dynamic | yes |
_requestNotificationPermission | Dynamic | yes |
| Method |
|---|
static function notifySimple_jni(id:Int, title:String, text:String):Void |
static function cancelNotification_jni(id:Int):Void |
static function requestNotificationPermission_jni():Void |