黑莓 - 单击消息通知打开应用程序
我的应用程序将消息通知发送到主屏幕通知栏,但是当我单击那里的某些消息时,“消息预览”窗口会打开。
我知道
SO - 从黑莓中的通知栏打开应用程序
SO - 主屏幕上的 Blackberry ApplicationIndicator 点击处理程序
虽然我已经实现了 < a href="http://www.blackberry.com/developers/docs/6.0.0api/net/rim/blackberry/api/messagelist/ApplicationMessageFolderListener.html" rel="nofollow noreferrer">ApplicationMessageFolderListener 并将其添加到 ApplicationMessageFolder,仍然 actionPerformed 永远不会被调用。
有没有办法处理来自自己的应用程序的通知消息点击事件?
BB 上有同样的问题 论坛。
My app sending messages notification to the home screen notification bar, but when I'm clicking on some message there, "Message Preview" window opens.
I am aware of
SO - Opening application from notification bar in blackberry
SO - Blackberry ApplicationIndicator click handler on Home Screen
While I have implemented ApplicationMessageFolderListener and adding it to ApplicationMessageFolder, still actionPerformed is never called when I'm clicking on message in notification bar.
Is there a way to handle notification message click event from own application?
Same question on BB forums.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最近也遇到了同样的问题。当用户打开
ApplicationMessage
对象时,不会通知ApplicationMessageFolderListener.actionPerformed()
。如果用户将消息标记为已打开但未实际打开它,则会收到通知。经过一番挖掘,这是设计使然。要在消息实际打开时收到通知,您必须实现一个扩展
ApplicationMenuItem
类并重写其run()
方法的类。context
参数将设置为正在打开的ApplicationMessage
对象。然后,您可以使用ApplicationMessageFolderRegistry.registerMessageMenuItems()
方法为该菜单项适用的特定消息状态组合(例如ApplicationMessage.Status.UNOPENED
)注册该菜单项。I recently struggled with this very same problem. When a user opens an
ApplicationMessage
object,ApplicationMessageFolderListener.actionPerformed()
is not notified. It is notified if the user marks the message as opened without actually opening it. After some digging, this is by design.To get notified when the message is actually opened, you have to implement a class that extends the
ApplicationMenuItem
class and overrides itsrun()
method. Thecontext
parameter will be set to theApplicationMessage
object that is being opened. You can then register that menu item using theApplicationMessageFolderRegistry.registerMessageMenuItems()
method for the particular message state combinations that the menu item applies to, such asApplicationMessage.Status.UNOPENED
.