DrMoriarty / godot-local-notification

Godot module for local notifications (android and iOS)
MIT License
140 stars 24 forks source link

repeating_interval seem working wrong #19

Closed kyoz closed 3 years ago

kyoz commented 3 years ago

The idea is to show notification for user at exact time every day.

So i use it like:

show("Hello", "Hello", interval_time, 1, 86400)

But it seem what ever repeating_interval i'v set doesn't make any different, it's always looping in one minute (or around 1 minute)

Anyone have any ideas on this?

DrMoriarty commented 3 years ago

What platform do you use? (iOS or Android) iOS implementation for repeating notification only use last argument and use it as first delay and repeating value. It is the platform limitation for notification.

kyoz commented 3 years ago

I'm using Android, it work just fine and keep looping, but no matter interval_time i'v set, it's always repeat in around 1 minutes @@.

For now, i'v to create multiple notifications to display notify every day like so (although it's not good for performance)

    for tag in range(0, 30):
        LocalNotification.cancel(tag)

    for tag in range(0, 30):
        LocalNotification.show("Hello", "Testing App", reminder_time + 86400 * tag, tag)
DrMoriarty commented 3 years ago

@kyoz by my mistake repeat interval for Android doesn't converted from seconds to milliseconds. If you multiply last parameter by 1000 you should get what you want. A little bit later I will fix this issue and update the plugin.

kyoz commented 3 years ago

Oh wow, Thanks you very much, i'll tried it as soon as it release :heart:

DrMoriarty commented 3 years ago

updated plugin - v.0.2.2