Comments (12)
Check your tag value. Call show function with the same tag will overwrite previous notification.
To make notification at specific time you can use this code:
var tt = OS.get_datetime()
tt.hour = 10
tt.minute = 30
if OS.get_unix_time_from_datetime(tt) < OS.get_unix_time():
tt.day += 1
localnotification.show('message', 'title', OS.get_unix_time_from_datetime(tt) - OS.get_unix_time(), 1)
Device token is used for remote (push) notifications. Local notifications you can use without token.
from godot-local-notification.
from godot-local-notification.
@martinpelli Check your export settings. You should export all resources of project or you should check if localnotification.gd
enabled for export.
from godot-local-notification.
@DrMoriarty yes is checked, maybe is the one click deploy I wil try with the apk
from godot-local-notification.
@DrMoriarty yes getting the same, and the app crash with an exported apk
from godot-local-notification.
@DrMoriarty on iOS I get stuck on bootsplash
and get this
from godot-local-notification.
@martinpelli Hi! The message "No library set for this platform" on android is not a fatal error. It shows because gdnative lib only used for iOS and for Android it used another plugin mechanism.
For iOS check if localnotification.xcframework set as Embed & Sign (on general page of settings in your xcode project).
Also the root of problem is that your gd wrapper doesn't loaded at runtime. I don't know why.
There is my minimal project for testing. You can check what the differs with your own project:
https://www.dropbox.com/s/ua9ea59cuzmbez6/nativelib-test.zip?dl=0
from godot-local-notification.
@DrMoriarty so I found my problem. First of all the localnotification.xcframework was set as do not embed, so I changed it and the app was still crashing. I checked everything with the minimal project and I found the difference: the plugin was setting the autoload at scripts/localnotifications.gd and the file was put on Scripts/localnotifications.gd so I changed my folder name to scripts,instead of Scripts and worked. When the app started It asked me if I allow notifications and I put yes. The log on xcode showed: Localnotifiaction plugin inited, showLocalNotification:Hi,2,1 but the notification never appear. So It is a problem or the notifications are managed with other tools like google cloud messaging?
from godot-local-notification.
@martinpelli Glad to hear that you solved the problem.
The local notifications doesn't depend on any third party service. The timer you set is seconds from the function call. So if you set 2 seconds and your app is still active at this time, notification will not be shown.
Usually I setup notifications when the app goes to background.
from godot-local-notification.
@DrMoriarty I tested it and worked 2 times I dont know why is not showing every time that enters on the show function. You can close the issue I guess. Just a last question. Is not possible to make a notification at a certain hour? And for what I can get the token of a device? Thanks for all.
from godot-local-notification.
@DrMoriarty you are right , all working perfect! And is without sound or my sound is not working?
from godot-local-notification.
Now it use system notification sound for Android and don't use sound for iOS. You can open new issue about sound configuration.
from godot-local-notification.
Related Issues (20)
- Get Token not working HOT 8
- Can't get cancel for android notifications to work. HOT 5
- please delete
- Note for iOS users HOT 1
- Feature request: provisional notifications for iOS
- repeating_interval seem working wrong HOT 5
- [iOS] no sound for local notification HOT 2
- [ios] Enhancement for ios repeating notification
- Can't get device token in Android HOT 1
- Repeating notification not working. HOT 2
- Quick actions without opening app itself
- Feature request : a why to change notification sound HOT 1
- Question about the implementation and running in background of the app.
- Notifications after reboot
- No library on current platform error from godot (Windows)
- Android trouble? HOT 17
- compile ios framework HOT 6
- Workability with Godot 3.5 or 3.51 HOT 5
- Invalid plugin config file HOT 1
- What's the license for this? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot-local-notification.