This is a module for Godot Game Engine which add local and remote notification feature for iOS and Android.
-
At first you need NativeLib-CLI or NativeLib Addon.
-
Make
nativelib -i local-notification
in your project directory if you are using CLI. FindLOCAL-NOTIFICATION
in plugins list and press "Install" button if you are using GUI Addon. -
Enable Custom Build for using in Android.
Add wrapper scripts/localnotification.gd
into autoloading list in your project. So you can use it everywhere in your code.
Show notification with title
and message
after delay of interval
seconds with tag
. You can override notification by it's tag before it was fired.
Cancel previously created notification.
Cancel all pending notifications (implemented for iOS only).
Request permission for notifications (iOS only).
Check if notification permission was requested from user (iOS only).
Check if notification permission was granted by user (iOS only).
Request system token for push notifications.
Returns system token for push notification.
Returns custom data from activated notification (Android only).
Returns action from deeplink, if exists. (Android only).
Returns deeplink URI, if exists (Android only).
- check if notifications
is_inited
, it means that application requested permissions from user. - call
init
if app didn’t requested it yet. - catch signal
enabled
or check methodis_enabled
. It will returnfalse
if user didn’t grant you permission. - get device token (
get_device_token
) for push notifications or catch signaldevice_token_received
- send your device token to the server side.
That’s all. Sending notifications processed by your server, receiving notifications processed by OS.