Is it possible to stack remote push notifications?
When receiving several push notifications for the same app without enter开发者_StackOverflowing the application, is it possible to stack the notifications? Similar to Iphones own (text)messaging app.
Thank you
Short answer : Yes with server side handling.
Long answer : When pushing a notification you can send some data with it see here
When a iPhone launches you can call a webservice which will reset the counter. When sending a notification you increase it.
Typical SQL table to do that is
| id_table (int) | UUID (TEXT) | notif_counter (int) |
or something like this.
With iOS 5's new notification system, notifications are available for the user to manually active individually.
There's no way for the app to get to these notifications programatically, so if your app needs them, the user has to activate each and every one of them.
Before iOS 5 only the latest notification had a chance of getting to the app, all previous notifications just got lost.
As Charles Vu wrote, you can solve this server side, depending on the nature of the notification. If it's a messaging app, then the server can easily track what messages the device has not received yet, but for other types of notifications this might not be possible.
So the answer is no, but there are more or less attractive workarounds.
精彩评论