freshplanet / ANE-Push-Notification

Air Native Extension (iOS and Android) for Push Notification
Apache License 2.0
205 stars 104 forks source link

Error in "develop" version on Android #29

Closed Robertsayegh closed 7 years ago

Robertsayegh commented 10 years ago

Upon reception of Push Notification only using develop version the application haults and an error is displayed

Neverbirth commented 10 years ago

I'm having the same problem, both with the develop versión and the cleaning one. Did you find a solution? will look into this today again, maybe it's some resource issue, forcing us to recompile binaries, but it didn't happen with older versions. Or maybe the payload message format has been changed?

Neverbirth commented 10 years ago

Just looked into this, the ANE is not correctly compiled, it lacks the needed classes for NotificationCompat, I guess the author didn't notice it because his projects already had them in other ANE or something similar. You should add:

            <mkdir dir="../android/temp/zip"/>
            <unzip src="../android/libs/android-support-v4.jar" dest="../android/temp/zip"/>
            <copydir src="../android/temp/zip/android" dest="../android/temp/classes/android"/>

In build.xml, above

            <mkdir dir="../temp/android/"/>

Line 65 on current cleaning branch build.xml file.

Neverbirth commented 10 years ago

Made some tests on an App, and noticed the data received on the AS side when a notification event is dispatched has changed as well, before you couldn't check the whole payload data, which sometimes could be a pain, and caused a difference of behaviour when compared to iOS, now all the data is available. The downside now is that if you send custom data within the message, and need to keep backward compatibility with previous ANE versions you may end with some extra parameters property in your parameters object, which doesn't happen on iOS. I've decided to add a property to my custom notifications management site to take this into account.

Everything perfect so far.