Giter Club home page Giter Club logo

Comments (12)

DrMoriarty avatar DrMoriarty commented on May 28, 2024 2

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.

martinpelli avatar martinpelli commented on May 28, 2024

image

image

image

from godot-local-notification.

DrMoriarty avatar DrMoriarty commented on May 28, 2024

@martinpelli Check your export settings. You should export all resources of project or you should check if localnotification.gd enabled for export.
Снимок экрана 2020-12-31 в 10 17 59

from godot-local-notification.

martinpelli avatar martinpelli commented on May 28, 2024

@DrMoriarty yes is checked, maybe is the one click deploy I wil try with the apk

from godot-local-notification.

martinpelli avatar martinpelli commented on May 28, 2024

@DrMoriarty yes getting the same, and the app crash with an exported apk

image

from godot-local-notification.

martinpelli avatar martinpelli commented on May 28, 2024

@DrMoriarty on iOS I get stuck on bootsplash
and get this

image

from godot-local-notification.

DrMoriarty avatar DrMoriarty commented on May 28, 2024

@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.

martinpelli avatar martinpelli commented on May 28, 2024

@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.

DrMoriarty avatar DrMoriarty commented on May 28, 2024

@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.
IMAGE 2021-01-04 11:21:51

from godot-local-notification.

martinpelli avatar martinpelli commented on May 28, 2024

@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.

martinpelli avatar martinpelli commented on May 28, 2024

@DrMoriarty you are right , all working perfect! And is without sound or my sound is not working?

from godot-local-notification.

DrMoriarty avatar DrMoriarty commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.