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.
I recently struggled with this very same problem. When a user opens an
ApplicationMessageobject,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
ApplicationMenuItemclass and overrides itsrun()method. Thecontextparameter will be set to theApplicationMessageobject 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.