推送通知 - 赶上他们? [英] Push notifications - catching them?

查看:123
本文介绍了推送通知 - 赶上他们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好了,所以这里是这笔交易。

okay, so here is the deal.

我的应用程序使用的是iOS的通知。
在应用程序委托我在didReceiveRemoteNotification赶上他们,如果应用程序是在前景
我赶上它didBecomeActive如果应用程序在背景并我拍了拍推送通知。

my app is using iOS notifications. in app delegate I am catching them in didReceiveRemoteNotification if the app is in foreground i catch it in didBecomeActive if app was in background and i tapped on the push notification.

但是!

如果我的应用程序是在背景后,我收到推送通知,如果我做的的自来水推送通知(或只是在iOS中低于5.0就可以了取消 ),并在说,几分钟开放的应用程序,我想不通我怎么觉得这推送通知。有什么建议?

if my app is in background, i receive push notification and if i do not tap on push notifications (or just "Cancel" on it in iOS less than 5.0), and open app in say, couple minutes, i can't figure out how do I find this push notification. any suggestions?

谢谢!

推荐答案

如果您的应用程序在后台操作系统处理推送通知。它集徽章,显示文本或播放声音。你甚至可以在指定的iOS5发射图像什么用的应用程序时,OK是pressed启动。

If your app is in background the OS handles the push notifications. It sets a badge, shows a text or plays a sound. You even can specify a launch image in iOS5 what the app launches with when "OK" is pressed.

不过,如果你不这样做preSS确定或取消的通知弹出,没有机会赶上的任何信息。

However if you do not press OK or cancel the notification PopUp, there is no chance to catch any information.

如果您从应用服务器发送的通知,您可以实现该服务器可要求最后一份通知,甚至通知历史记录的接口(REST或此类)。但是,这是一种解决方法。

If you send your notifications from an application server, you could implement an interface (REST or such) on that server which can be asked for the last notification or even the notification history. But that is a workaround.

这篇关于推送通知 - 赶上他们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆