Closed anishmishra0 closed 3 weeks ago
Hi @anishmishra0, could you share your code as well as what you wanted to achieve? Thanks.
extends Control
var id = 0
func _ready():
if !$NotificationScheduler.has_post_notifications_permission():
$NotificationScheduler.request_post_notifications_permission()
var channel = NotificationChannel.new()
channel.set_id("my_channel_id")
channel.set_name("My Channel Name")
channel.set_description("My channel description")
channel.set_importance(NotificationChannel.Importance.HIGH)
$NotificationScheduler.create_notification_channel(channel)
func _on_button_pressed():
var my_notification_data = NotificationData.new()
id +=1
my_notification_data.set_id(id)
my_notification_data.set_channel_id("my_channel_id")
my_notification_data.set_title("My Notification Title")
my_notification_data.set_content("notification content "+str(id))
my_notification_data.set_delay(int($LineEdit.text))
$NotificationScheduler.schedule(my_notification_data)
func _on_button_2_pressed():
var my_notification_data = NotificationData.new()
my_notification_data.set_id(30)
my_notification_data.set_channel_id("my_channel_id")
my_notification_data.set_title("repeating")
my_notification_data.set_content("repeating content ")
my_notification_data.set_small_icon_name("ic_notification")
my_notification_data.set_delay(int($LineEdit.text))
my_notification_data.set_interval(30)
$NotificationScheduler.schedule(my_notification_data)
My Scene
what you wanted to achieve?
I Just want to close the app, it keeps on restarting when i try to close it with back button
Steps to reproduce
It sounds like when you tap the back button, Android restarts the activity that forwarded the notification to your app, which forwards the notification to your app again. Interesting bug. Thanks for reporting it.
Hi @anishmishra0, please let me know if the new release fixes this issue on your side.
Yes, this new release resolved my issue. Thank you very much for this plugin.
You're welcome. Also check out the other plugins.
Here's screen recording of the issue https://github.com/user-attachments/assets/33045044-b290-4b0c-aa1f-21040257f801