distriqt / airnativeextensions

DEPRECATED: Original repository of the distriqt native extensions and is no longer maintained. Please see our site for the latest ANEs
https://airnativeextensions.com
2 stars 0 forks source link

Push Notifications : remark + question #303

Closed Fte-github closed 9 years ago

Fte-github commented 9 years ago

Hi guys,

I'm trying to use your Push Notifications ANE in my application. I finally managed to get it working and I receive the messages. I get the notification when the app is open (obviously) and if I close it and I launch the push a little after that works. But if I wait a few hours and try to send it again that doesn't work anymore, the PHP page says the registration_id is'nt registered.

Did I do something wrong ? Or is it working as intended ? Because if you can only send push notifications when the application is running, that's kind of useless, no ?

I wanted to use the push notifications to tell to my users that new content is available. It's not an application that a user launches every day, so I need these push notifications to encourage a user to open the application when there's something new to do !

And for information, Google changed their API pages. When you have a moment I think it would be good to update your tutorial (http://distriqt.com/wordpress/wp-content/uploads/2013/03/TutorialPushNotificationsPart1.pdf pages 17-20)

Thanks for your help !

marchbold commented 9 years ago

No,

You definitely should be able to receive push notifications when the application isn't running.

Double check you have all the correct manifest additions, this is the most common cause of not correctly receiving push notifications when running in the background. You can post yours here if you want me to check over them.

Fte-github commented 9 years ago

Okay that's great, thanks !

Here's the android declaration of my manifest. I obviously removed the IDs. I followed what's in the demo application :

``` ]]> ```

I'll continue to search where the problem is coming from. Thanks for your help !

[Edit : I don't know why but it seems it's working now. I juste did everything from scratch again. Thanks for the answer, I close the issue]