godot-local-notification
godot-local-notification copied to clipboard
Get Token not working
Hi on godot 3.2.2 and 3.2.4 on iOS, the module init perfect and I can get the request for notifications but when getting the token is not working (is not printing)
Show me the code do you use?
I just use the same script that is in the project, I put it as autload and then
Localnotification.init()
Localnotification.is_enabled()
Localnotification.get_device_token()
you should not call get_device_token
if is_enabled
not return true
also you may want to connect Localnotification's signal enabled
to your method where you can get device token (because event enabled
fired when user grants permission for using notifications)
Like this way is not working, it´s printing "hola2" and nothing more
Localnotification.connect("device_token_received",self,"on_device_token_received")
Localnotification.connect("enabled",self,"on_enabled")
Localnotification.init()
Localnotification.is_enabled()
func on_enabled():
print(Localnotification.get_device_token())
print("hola2")
func on_device_token_received(token):
print("hola")
print(token)
@DrMoriarty Is there any development on this? I can't get the device token as well
@slabgames check Firebase Cloud Messaging plugin, now it available for iOS
@DrMoriarty Thanks for updating the plugin
Any news? I'm trying to get push notifications but get_device_token
is null for me. Local notifications work fine.