开发者

How to create a Blackberry notification message that opens the app like twitter does?

does anyone know what is the actual code to create a local notification in the Blackberry app that has a customized application icon and when the user clicks on the notification in the inbox, it goes directly to a specific page in the application? This is similar to how Twitter for blackberry works, whereby you can be not开发者_如何转开发ified of new tweets via your inbox and on clicking on the link brings you to the tweets list in the twitter app. Thanks.

How to create a Blackberry notification message that opens the app like twitter does?


What you're looking for is referred to as Message List integration or sometimes as Message Folders. Note that the name "message folder' is a little misleading. This isn't to create a "folder" that the user has to go into (that threw me off first); rather it creates the message in the inbox as you describe. For the best user experience you'll also want to create an application notification icon.

The package name to concern yourself with is net.rim.blackberry.api.messagelist. You will need to implement ApplicationMessage to do what you've requested.

There is an example of how to do this in the sample source code that ships with the JDE, the project name is "MessageListDemo". All JDEs dating back to (at least) OS 4.5 will have it this sample app. If you want to use the new notification bar integration for OS6, make sure to take a look at the 6.0 MessageListDemo.

Here is a quick overview of the process and bare-bones example. It's for 6.0 but I believe the API they remains the same back to 4.6, and had minor changes from 4.5). The MessageListDemo sample will be better though, as it's more thorough and includes everything you'll need to do -- such as implementing MessageFolderListener to detect when the user opens one of your custom messages.

Finally - I see that you have asked many questions but not accepted any answers, even valid ones. Please make sure to accept this answer if it helps you in order to ensure people keep replying to your questions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜