Hopefully this is something stupid.
I am just making my own player and putting in add-ons.
I have got the Notification add-on in place, and if I do a dispatchNow event something appears straight away so I guess it working (not tried the rest) however I get a crash on relaunch.
If I launch the player, exit and re-enter it is all fine.
If I launch the player, choose my project and launch - it starts ok.
I then exit and re-enter the app and it crashes in the onResume before my project reappears again - logs below.
My Lua code for notifications is only run in main so does not even get touched on the resume.
The crash happens regardless of if I trigger a notification in my project or not.
----
Here is a link to the stack trace :
http://pastebin.com/raw/T8ES37m2
Comments
Output is :
Bundle Debug: profile = "0"
Still none the wiser, but got more info
what Android version do you use?
Basically the problem is that one of the notification value is null, and this notification is queued internally, and it should be removed once it is processed, but it is never processed because it crashes due to null value.
I don't remember old behavior, but if you are using new Android version, then it could mean that new Android version does not allow null values anymore, and thus the problem, or you somehow got the null value the way I did not anticipate when creating the plugin
https://github.com/gideros/gideros/blob/master/plugins/notification/source/Android/src/com/giderosmobile/android/plugins/notification/NotificationClass.java
Will continue my notification quest tomorrow :-)
I have made some updates to the handler for newer android builds (it wont build against the latest) will share when I am sure everything works. Weird thing I have to debug now is dispatchafter not firing if I am in the app or exit it, yet if I crash the lua (I found this out accidentally!!!) The notification then appears on schedule, very weird.
Here is a pastebin with the modified GNotification : http://pastebin.com/H4bZQ1vn
Anyway here is the working one :
http://pastebin.com/HAu8nf1G
The error is basically that setLatestEventInfo(....) has been removed from the latest version so I just grabbed some existing Notification code I had from a native Android app and spliced it in (see latest pastebin) - it works great and uses the compatibility library now.