-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opening a scene by clicking on a notification. #13
Comments
When user opens application with notification clicking you can call |
I'm sorry but do you mean clicking on a notification opens an app right now? If so, there might be a bug causing the app to crash on Android. Let me know and I'll try to get error logs and debug. |
yes, when you click on notification the app should start with special data from notification in application intent. |
Not really getting much info besides: |
this is not the reason of crash (if it exists) |
I am having some trouble with debugging. For some reason the debugger just disconnects and then I can't get any info. adb logcat isn't helping right now. I'm trying to square in on the problem, will edit this comment if/when I have something definite. |
Here's the log info. The package name is org.godotengine.sunflower. Unfortunately, I can't seem to find the error causing the app to crash. Once the app crashes, I can't seem to open the app even after removing it from memory. |
I see the problem:
You should disable all plugins one by one to detect the broken one. |
But notification is the only plugin I'm using! |
Very interesting! So it can be crashes when it try to extract notification data on app start. |
I'll be happy to test it ASAP. |
I pushed commit. |
@Altair1234 Could you build the plugin locally or I should build and release it? |
It'll be helpful if you released it. I'm not really familiar with Godot. Also, where do I put the get_notification_data() code? After setting the alarm? |
Ok, I will release it in some minutes.
|
Alright, I will need to read up on the documentation, but thanks! |
uploaded compiled plugin v 0.2.1 |
The debugger refuses to work for me. I'll try a few things but it might take time :) |
Bug with custome builds, will take quite some time before they release the version IF the PR is accepted AND IF it fixes the issue. Is it possible for you to check the plugin on your end? |
I have no this issue, I checked on macosx and plugin works for me (also opening the app by tapping on notification don't lead to crash for me) |
Windows 10 with Samsung M31. Also tried on Mi A1. It seems like the remote debugger has always had issues. Wonder if there's an alternative to this? |
Did you tried debugger from Android Studio? It will be enough to get crash logs (or regular logs) |
Sorry I've been away for a while. Finally managed to get the error logs, just before they vanish. Also, app only crashes if it is already open and then the notification is clicked on. |
@Altair1234 is it the log when the app did crash? |
Uh scroll to the bottom. Singleton part was in red, and so were 3-4 lines around it. That's error, right? |
^ this is not the reason to crash. They are errors at gd script level but just warning at level of the application. |
I have the same problem.
|
@avnerh1 |
Looking forward to adding custom data for local notifications. On the same note, would it be possible to allow opening a URL in the browser upon tapping the notification, instead of starting the app? |
Couldn't you just have a main scene that checks if the app was opened by the notification and if not runs the app's main scene but if it was opened from a notification runs OS.shell_open(url: str) ? |
I think this is necessary for a notification plugin. I know how to open Activities in Android by clicking on a notification but don't know how that will work with Godot. If I can get some help in understanding this, I'll be happy to add this functionality.
The text was updated successfully, but these errors were encountered: