Search code examples
apple-push-notificationstitaniumappceleratortitanium-alloy

Is it possible display a banner for ios when receiving push notification while app is in foreground?


Currently my app can receiving push notification and display a banner when receiving a push notification while the app is in background.

But however when my app is in foreground, there is no banner showing up. I look in the log and I found out that I can receive push notification (i print out the payload).

Any way to display a banner while in app? Or is it a limitation?

I am using the Appcelerator Ti.Network.registerForPushNotifications for push notification.


Solution

    • This is not a limitation of Titanium.
    • Apple doesn't allow to show notification banner when app is in foreground.
    • All you can do is to create and animate a manual view when your Push callback is called in foreground state.