All Projects → DrMoriarty → godot-local-notification

DrMoriarty / godot-local-notification

Licence: other
Godot module for local notifications (android and iOS)

Programming Languages

Objective-C++
1391 projects
java
68154 projects - #9 most used programming language
GDScript
375 projects
C++
36643 projects - #6 most used programming language
javascript
184084 projects - #8 most used programming language
shell
77523 projects
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to godot-local-notification

nativelib-cli
NativeLib is a plugin management system for Godot engine.
Stars: ✭ 19 (-82.88%)
Mutual labels:  godot, godot-engine, godot-module, godot-plugin, nativelib
godot-android-plugin-firebase
Godot 3.2.2 Android plugin for Firebase
Stars: ✭ 41 (-63.06%)
Mutual labels:  godotengine, godot, godot-engine, godot-module, godot-plugin
MySQL Module
MySQL connector to Godot Engine.
Stars: ✭ 30 (-72.97%)
Mutual labels:  godotengine, godot, godot-engine, godot-module, godot-game-engine
Godot-3.0-Noise-Shaders
Godot 3.0 Noise Shaders
Stars: ✭ 38 (-65.77%)
Mutual labels:  godotengine, godot, godot-engine, godot-game-engine
PostgreSQLClient
PostgreSQL connector for Godot Engine in GDScript.
Stars: ✭ 28 (-74.77%)
Mutual labels:  godot, godot-engine, godot-module, godot-plugin
godot box2d
A C++ module that integrates the Box2D library with the Godot game engine by providing nodes for standard Box2D objects.
Stars: ✭ 32 (-71.17%)
Mutual labels:  godotengine, godot, godot-engine, godot-module
Project-Map
No description or website provided.
Stars: ✭ 52 (-53.15%)
Mutual labels:  godotengine, godot, godot-engine, godot-plugin
discord.gd
Discord Bot API wrapper for Godot. Make bots in GDScript.
Stars: ✭ 69 (-37.84%)
Mutual labels:  godotengine, godot, godot-engine, godot-plugin
GodotFAN
Facebook Audience Network Ad module for godot
Stars: ✭ 25 (-77.48%)
Mutual labels:  godot, godot-engine, godot-module, godot-plugin
Godot-DialogPlugin
🗨️ A Dialog Node for Godot Engine
Stars: ✭ 194 (+74.77%)
Mutual labels:  godotengine, godot, godot-engine, godot-plugin
Logic-Circuit-Simulator
A free and open-source Logic Circuit Simulator built in Godot Engine.
Stars: ✭ 23 (-79.28%)
Mutual labels:  godotengine, godot, godot-engine
godot-lod-demo
Demonstration project for the Level of Detail (LOD) Godot 3.x add-on
Stars: ✭ 34 (-69.37%)
Mutual labels:  godotengine, godot, godot-engine
godot-interpolated-camera3d
Provides an InterpolatedCamera3D node that replicates its 3.2.x functionality (and more)
Stars: ✭ 40 (-63.96%)
Mutual labels:  godotengine, godot, godot-engine
godot-gameshell
Godot export templates and instructions for the GameShell portable game console and other single-board computers
Stars: ✭ 34 (-69.37%)
Mutual labels:  godotengine, godot, godot-engine
DartGodot
Godot + Dart 🎯
Stars: ✭ 79 (-28.83%)
Mutual labels:  godotengine, godot, godot-engine
toziuha-night-oota
Opensource Metroidvania inspired on Castlevania Order of Ecclesia
Stars: ✭ 78 (-29.73%)
Mutual labels:  godotengine, godot, godot-engine
godot-cpp-cmake
CMake scripts to build cross-platform GDNative C++ bindings
Stars: ✭ 20 (-81.98%)
Mutual labels:  godotengine, godot, godot-engine
godot-admob-editor
This repository is for Godot's Addons to integrate natively AdMob to your Game Project without much configurations, with a beautiful UI and directly inside Godot Editor!
Stars: ✭ 43 (-61.26%)
Mutual labels:  godotengine, godot, godot-engine
autotiler
Autotile 47-tile blob tileset generator application with Godot export support. Based on Electron JS.
Stars: ✭ 32 (-71.17%)
Mutual labels:  godotengine, godot, godot-engine
OpMon-Godot
An open source Pokemon-inspired game, now with Godot
Stars: ✭ 50 (-54.95%)
Mutual labels:  godotengine, godot, godot-engine

Local/Push notification plugin for Godot engine

This is a module for Godot Game Engine which add local and remote notification feature for iOS and Android.

Installation

  1. At first you need NativeLib-CLI or NativeLib Addon.

  2. Make nativelib -i local-notification in your project directory if you are using CLI. Find LOCAL-NOTIFICATION in plugins list and press "Install" button if you are using GUI Addon.

  3. Enable Custom Build for using in Android.

Usage

Add wrapper scripts/localnotification.gd into autoloading list in your project. So you can use it everywhere in your code.

API

show(message: String, title: String, interval: float, tag: int, repeating_interval: int = 0)

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. If you defined repeating_interval the notification will be fired in a loop until you cancelled it.

show_daily(message: String, title: String, hour: int, minute: int, tag: int = 1)

Show notification daily at specific hour and minute (in 24 hour format). You can overide the notification with new time, or cancel it with tag and register a new one.

Need help: Currently just support ios, need help on Android

cancel(tag: int)

Cancel previously created notification.

cancel_all()

Cancel all pending notifications (implemented for iOS only).

init()

Request permission for notifications (iOS only).

is_inited() -> bool

Check if notification permission was requested from user (iOS only).

is_enabled() -> bool

Check if notification permission was granted by user (iOS only).

register_remote_notification()

Request system token for push notifications.

get_device_token() -> String

Returns system token for push notification.

get_notification_data() -> Dictionary

Returns custom data from activated notification (Android only).

get_deeplink_action() -> String

Returns action from deeplink, if exists. (Android only).

get_deeplink_uri() -> String

Returns deeplink URI, if exists (Android only).

Customising notifications for Android

The default notification color is defined in android/build/res/values/notification-color.xml. You can change it at your desire. The color string format is #RRGGBB.

In order to change default notification icon you should make this new files:

android/build/res/mipmap/notification_icon.png            Size 192x192
android/build/res/mipmap-hdpi-v4/notification_icon.png    Size 72x72
android/build/res/mipmap-mdpi-v4/notification_icon.png    Size 48x48
android/build/res/mipmap-xhdpi-v4/notification_icon.png   Size 96x96
android/build/res/mipmap-xxhdpi-v4/notification_icon.png  Size 144x144
android/build/res/mipmap-xxxhdpi-v4/notification_icon.png Size 192x192

Notification icons should be b/w with alpha channel. They will be tinted with color which we discuss above.

Use push notifications for iOS

  1. check if notifications is_inited, it means that application requested permissions from user.
  2. call init if app didn’t requested it yet.
  3. catch signal enabled or check method is_enabled. It will return false if user didn’t grant you permission.
  4. get device token (get_device_token) for push notifications or catch signal device_token_received
  5. send your device token to the server side.

That’s all. Sending notifications processed by your server, receiving notifications processed by OS.

Troubleshooting

If the notification doesn't appear, make sure you're not trying to display it while your game is in the foreground. In iOS, apps can only show notifications if they are in the background. This implies that you must use interval > 0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].