背景通知-黑莓
即使应用程序未打开,我也想使用后台通知等方式显示用户通知。它将监听服务器并每 30 分钟检索更新并向用户显示消息。我怎样才能在黑莓手机上实现这个?
我不想使用 RIM 推送服务。
I want to show the user notification even when the app is not open, using something like background notification. It will listen to a server and will retrieve updates every 30 minutes and show the user the message. How can I implement this on BlackBerry.
I don't want to use RIM push service.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查 net.rim 之间的差异.device.api.system.Application 和 net.rim.device.api.ui.UiApplication。
不需要任何用户交互的应用程序可以直接从
Application
类派生。需要用户交互的应用程序应从UiApplication
派生。Check the difference between net.rim.device.api.system.Application and net.rim.device.api.ui.UiApplication.
Applications which do not require any user interaction may be derived directly from
Application
class. Applications which require user interaction should be derived fromUiApplication
.创建一个单独的应用(或为现有应用提供第二个入口点),该应用实现
net.rim.device.api.system.Application
并配置为在设备启动时运行。只要操作系统正在运行,您的应用程序实例就会在自己的后台进程中运行。它可以执行所需的任何数据轮询,然后在需要时向用户显示通知,例如使用net.rim.blackberry.api.messagelist.ApplicationIndicator
和net.rim .blackberry.api.messagelist.ApplicationMessageFolder
API,或您自己的自定义 UI。Create a separate app (or give your existing app a second entry point) that implements
net.rim.device.api.system.Application
and is configured to run at device startup. That instance of your app will then be running in its own background process for as long as the OS is running. It can do whatever data polling it needs to do, and then display notifications to the user when needed, such as with thenet.rim.blackberry.api.messagelist.ApplicationIndicator
andnet.rim.blackberry.api.messagelist.ApplicationMessageFolder
APIs, or your own custom UI.