ApplicationMessageFolderListener

ApplicationMessageFolderListener

本文介绍了黑莓 - 对mesage通知点击打开的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序发送消息通知到主屏幕通知栏,但是当我点击了一些消息出现,打开消息preVIEW窗口。

My app sending messages notification to the home screen notification bar, but when I'm clicking on some message there, "Message Preview" window opens.

我知道结果的
SO - 从通知栏打开黑莓结果应用
SO - 在主屏幕上黑莓ApplicationIndicator单击处理程序

I am aware of
SO - Opening application from notification bar in blackberry
SO - Blackberry ApplicationIndicator click handler on Home Screen

虽然我已实施 ApplicationMessageFolderListener 并增加它 ApplicationMessageFolder ,仍然的actionPerformed 不会被调用,当我点击消息中的通知栏。

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?

同样的问题关于BB论坛。

推荐答案

最近,我挣扎着这同一个问题。当用户打开一个 ApplicationMessage 对象, ApplicationMessageFolderListener.actionPerformed()不通知。如果用户标记为没有实际打开它打开了该邮件就被通知。一些挖后,这是由设计。

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.

要得到通知时,该消息实际上是打开,你必须实现它扩展了 ApplicationMenuItem 类,并覆盖其运行类()方法。在背景参数将被设置为正被打开 ApplicationMessage 对象。然后,您可以使用 ApplicationMessageFolderRegistry.registerMessageMenuItems()方法,该菜单项适用于特定消息的状态组合,如 ApplicationMessage注册该菜单项.Status.UNOPENED

To get notified when the message is actually opened, you have to implement a class that extends the ApplicationMenuItem class and overrides its run() method. The context parameter will be set to the ApplicationMessage object that is being opened. You can then register that menu item using the ApplicationMessageFolderRegistry.registerMessageMenuItems() method for the particular message state combinations that the menu item applies to, such as ApplicationMessage.Status.UNOPENED.

这篇关于黑莓 - 对mesage通知点击打开的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 02:35