黑莓推送通知报名时间 [英] BlackBerry Push Notification registration time

查看:195
本文介绍了黑莓推送通知报名时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我用黑莓登记自己的应用程序,我可以接收推送封邮件,但在一定时间左右后(3小时),我尝试推到重新启动设备,但没有运气的话,我必须与黑莓再次注册,所以我可以接受推动。

So i register my App with BlackBerry and i could receive push msgs but after a certain time around (3 hr) i try to push to the device again but no luck, then i have to register again with BlackBerry so i could receive pushes.

什么是我需要再次注册,并且是相关的,我有一个发展的凭据不是生产呢?

what is the time that i need to be register again and is that related that i have a development credentials not a production one ?

推荐答案

注册应该是持久的。但RIM公司的服务器有时片状:你看到了这个一贯发生

Registration should be persistent. But RIM's servers are sometimes flaky: are you seeing this happen consistently?

您使用OS 5.0.0或更早的版本?如果是旧的操作系统版本,你需要确保你的监听线程一直在运行。对于5.0.0及以上版本,操作系统需要照顾这个给你。

Are you using OS 5.0.0 or earlier? If it's the older OS versions, you need to make sure your listening thread is always running. For 5.0.0 and above, the OS takes care of this for you.

另一种认为涉及证实交付和应用的确认。如果您在使用本服务级别(可无论是推或加推要领),但是你的应用程序不承认通知暂停,RIM可能标志着你的设备,并不会发送任何进一步的通知。

Another thought relates to confirmed delivery and application acknowledgment. If you are using this level of service (available for either Push Plus or Push Essentials), but your application is not acknowledging the notification, RIM may mark your device as suspended and won't send it any further notifications.

默认是使用未确认的交付方式。如果你在Java中使用RIM的服务器端的SDK,你有code是这样的:

The default is to use the UNCONFIRMED delivery method. If you're using RIM's server-side SDK in Java, and you have code like this:

pushMessageControl.getQualityOfService().setDeliveryMethod(DeliveryMethod.CONFIRMED);

或者,如果你不使用他们的SDK,但在你的推送请求XML如下:

Or if you're not using their SDK, but have the following in your push request XML:

<quality-of-service delivery-method="confirmed"/>

然后你需要调用下面​​在通知处理你的黑莓应用程序:

Then you need to call the following in your BlackBerry app in the notification handler:

pushInputStream.accept();

这是推SDK的一部分 pushdemo 样本设备应用程序支持可选的应用程序的确认,所以你应该学习的code,看看该怎么办。

The pushdemo sample device application that is part of the Push SDK supports optional application acknowledgment, so you should study that code to see what to do.

这篇关于黑莓推送通知报名时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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