Description
Changelog
Reviews (1)
Godot Notification Scheduler Plugin
A unified GDScript interface for scheduling local notifications on Android and iOS.
Features:
- Schedule local notifications with customizable titles, content, and delays.
- Schedule repeating notifications with intervals.
- Manage notification channels and badges.
- Handle permissions and user interactions via signals.
- Plugin handles system restart allowing scheduled notifications to survive device reboots
Demo
Try the demo app located in the demo directory.
Installation
Uninstall previous versions before installing. If using both Android & iOS, ensure same addon interface version.
Installation Options
There are 3 ways to install the Notification Scheduler plugin into your project:
- Through the GMP Menu (recommended)
- Through the Godot Editor's AssetLib
- Manually by downloading archives from Github
- install GMP Menu if not installed
- enable
GMP Menuvia thePluginstab ofGodot Editor'sProject->Project Settings...menu if not enabled - select
Notification Scheduler PluginfromGodot Editor'sGMPmenu - select desired plugin version and platform
- click
Downloadbutton - once the download has completed, click
Installbutton - enable
NotificationSchedulervia thePluginstab ofProject->Project Settings...menu, in the Godot Editor
- Open the Godot AssetLib and search for
NotificationScheduler - Click Download → Install
- Install to the project root with Ignore asset root enabled
- Enable the plugin via Project → Project Settings → Plugins
- For iOS, also enable the plugin in the export settings
- If installing both Android and iOS versions, you may safely ignore file conflict warnings for shared GDScript interface files
- Download the latest release from GitHub
- Extract the archive into your project root
- Enable the plugin via Project → Project Settings → Plugins
- For iOS, also enable the plugin in the export settings
Usage
- Add a NotificationScheduler node to your scene.
- Connect signals:
initialization_completednotification_openednotification_dismissedpermission_grantedpermission_denied
- Check permission:
if not $NotificationScheduler.has_post_notifications_permission(): $NotificationScheduler.request_post_notifications_permission() - To send user to App Info (manual enable):
$NotificationScheduler.open_app_info_settings() - Create a notification channel:
var res = $NotificationScheduler.create_notification_channel( NotificationChannel.new() .set_id("my_channel_id") .set_name("My Channel Name") .set_description("My channel description") .set_importance(NotificationChannel.Importance.DEFAULT)) - Build & schedule notification:
Optionally call
var data = NotificationData.new() .set_id(1) .set_channel_id("my_channel_id") .set_title("My Title") .set_content("My content") .set_small_icon_name("ic_custom_icon") .set_delay(10) var res = $NotificationScheduler.schedule(data).set_big_picture_name("my_big_picture")to show a large expanded image with the notification on both Android and iOS (see Platform-Specific Notes for how to provide the image).
Signals
initialization_completed(): Emitted when the plugin is initialized.post_notifications_permission_granted(permission_name: String): Emitted when notification permission is granted to app.post_notifications_permission_denied(permission_name: String): Emitted when notification permission is denied to app.notification_opened(notification_data: NotificationData): Emitted when user taps notification.notification_dismissed(notification_data: NotificationData): Emitted when user dismisses notification.
Android-only Signals
battery_optimizations_permission_granted(permission_name: String): Emitted when battery optimization exemption permission is granted to app.battery_optimizations_permission_granted(permission_name: String): Emitted when battery optimization exemption is denied to app.schedule_exact_alarm_permission_granted(permission_name: String): Emitted when permission to schedule exact alarms is granted to app.schedule_exact_alarm_permission_denied(permission_name: String): Emitted when permission to schedule exact alarms is denied to app.
Methods
initialize()- initialize plugincreate_notification_channel(NotificationChannel)- create a new notification channel with given dataschedule(NotificationData)- schedule a new notification with given datacancel(id)– cancel notification with given Id before opened/dismissedget_notification_id()– get ID of last opened notificationhas_post_notifications_permission()– returns true if app has already been granted permissions to post notificationsrequest_post_notifications_permission()– request permissions to post notifications from useropen_app_info_settings()- open the system settings screen for app
Android-only Methods
has_battery_optimizations_permission()– returns true if app has already been granted permissions to ignore battery optimizationsrequest_battery_optimizations_permission()– request permissions to ignore battery optimizations from userhas_schedule_exact_alarm_permission()– returns true if app has already been granted permission to schedule exact alarmsrequest_schedule_exact_alarm_permission()– request permission to schedule exact alarms rom user
iOS-only Methods
set_badge_count(count)– show/hide app icon badge with count (on Android, useNotificationData'sset_badge_count()method)
Error Codes
| Constant | Value | Description |
|---|---|---|
ERR_ALREADY_EXISTS |
32 |
Channel ID already exists |
ERR_INVALID_DATA |
30 |
Invalid notification/channel data |
ERR_UNAVAILABLE |
2 |
Not supported on current platform |
ERR_UNCONFIGURED |
3 |
Plugin not initialized |
OK |
0 |
Success |
Classes
NotificationChannel
- Encapsulates data that defines the notification channel.
- Properties:
id,name,description,importance,badge_enabled
NotificationData
- Encapsulates data that defines the notification.
- Properties:
notification_id,channel_id,title,content,small_icon_name,large_icon_name,big_picture_name,delay,deeplink,interval,badge_count,custom_data - Note:
small_icon_nameandlarge_icon_nameare only used on Android. - Note:
big_picture_nameis supported on both Android and iOS — see Platform-Specific Notes for how to provide the image on each platform.
CustomData
- Encapsulates extra data to be sent and received along with other notification data.
- Allows setting of any number of
bool,int,float, orStringproperties.
Platform-Specific Notes
Android
- Default icon:
ic_default_notificationinres://assets/NotificationSchedulerPlugin/android - Custom icon:
- Generate via Android Studio → Image Asset Studio → Notification Icons
- Copy generated drawables into
res://assets/NotificationSchedulerPlugin/android - Use
set_small_icon_name("icon_name")
- Big picture image:
- Add an image (e.g.
my_big_picture.png) tores://assets/NotificationSchedulerPlugin/android/drawable-xxhdpi - Use
set_big_picture_name("my_big_picture") - Displayed via
NotificationCompat.BigPictureStylewhen the notification is expanded
- Add an image (e.g.
- App Optimization:
- Check app optimization settings
- If app settings are set to
OptimizedorRestricted, notifications may not be delivered when app is not running
- MIUI:
request_post_notifications_permission()may not work reliably on Xiaomi devices to fully exempt an app from MIUI's custom battery management features.
- App Optimization and Exact Alarm:
- The plugin will schedule an exact alarm to deliver the notification if the
SCHEDULE_EXACT_ALARMpermission has been granted, else the plugin will fall back to non-exact scheduling. - Obtaining the
IGNORE_BATTERY_OPTIMIZATIONSpermission will also allow scheduling of exact alarms - additionally requestingSCHEDULE_EXACT_ALARMpermission is not necessary.
- The plugin will schedule an exact alarm to deliver the notification if the
- Troubleshooting:
- Logs:
adb logcat | grep 'godot'(Linux),adb.exe logcat | select-string "godot"(Windows) - No small icon error: ensure icons exist in assets directory.
- Battery restrictions: check Settings → Apps → Your App → Battery.
- Logs:
iOS
- Set notification icons in Project → Export → iOS.
- Big picture image:
- Use
set_big_picture_name("my_big_picture")to attach a.png/.jpg/.jpegimage that's shown as an expanded preview, viaUNNotificationAttachment. - The image must be bundled with the exported app so it can be found via
NSBundle.mainBundle. The easiest way to have your big pictures bundled is to place the image files inside theres://assets/NotificationSchedulerPlugin/iosdirectory of your Godot project before exporting to iOS. - Apple limits image attachments to roughly 10 MB. If the image is missing or too large, it's skipped (with a warning in the logs) and the notification is still delivered without it.
- Use
- System limits:
- Max repeating notifications: 64
- Min interval: 60 seconds
- View XCode logs while running the game for troubleshooting.
- See Godot iOS Export Troubleshooting.
Video Tutorials
Notification Scheduler Plugin on Android -- _by Code Artist_
Links
All Plugins
| ✦ | Plugin | Android | iOS | Stars |
|---|---|---|---|---|
| Admob | ✅ | ✅ | ||
| Connection State | ✅ | ✅ | ||
| Deeplink | ✅ | ✅ | ||
| Firebase | ✅ | ✅ | ||
| In-App Review | ✅ | ✅ | ||
| Native Camera | ✅ | ✅ | ||
| Notification Scheduler | ✅ | ✅ | ||
| OAuth 2.0 | ✅ | ✅ | ||
| QR | ✅ | ✅ | ||
| Share | ✅ | ✅ | ||
| Vision | ✅ | ✅ | ||
| Plugin Template | ✅ | ✅ |
Credits
Developed by Cengiz
Based on Godot Mobile Plugin Template v7
Original repository: Godot Notification Scheduler
Changelog for version v6.0-Multi
No changelog provided for this version.
