0
votes

I cant find a clear answer about this in the Titanium documentation. Is it possible to directly respond to a push notification while the app is killed ?

I know that the callback is called when you open the app trough the push notification. but is there a way to respond when the app is opened manually ?

I tried to use remote-notification as UIBackgroundModes, but this only helps for paused apps.

My goal is to show the push notification in a in-app message center.

1

1 Answers

1
votes

You should never rely on push notifications to deliver you payloads, they are too limited for that. If the user receives 5 push notifications and opens the app via the app icon, you will never receive any of the payloads. If he opens the app via one of those notifications you will only receive that payload.

You could use silentpush: http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Background_Services-section-37539664_iOSBackgroundServices-SilentPush

But the app should always query a back-end to get the actual data. That's how WhatsApp does it as well, as you can see when you open it via a notification it will then still fetch the message(s) form the server.