如何创建像 Twitter 一样打开应用程序的 Blackberry 通知消息?

发布于 2024-10-18 15:22:13 字数 212 浏览 1 评论 0原文

有谁知道在具有自定义应用程序图标的黑莓应用程序中创建本地通知的实际代码是什么,当用户单击收件箱中的通知时,它会直接转到应用程序中的特定页面? 这与黑莓版 Twitter 的工作原理类似,您可以通过收件箱收到新推文通知,单击链接即可进入 Twitter 应用程序中的推文列表。谢谢。
在此处输入图像描述

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 notified of new tweets via your inbox and on clicking on the link brings you to the tweets list in the twitter app. Thanks.
enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤芳又自赏 2024-10-25 15:22:13

您正在寻找的内容称为消息列表集成,有时也称为消息文件夹。请注意,“消息文件夹”这个名称有点误导。这并不是要创建用户必须进入的“文件夹”(这首先让我失望);而是如您所描述的那样,它在收件箱中创建消息。为了获得最佳用户体验,您还需要创建一个 应用程序通知图标

需要关注的包名称是net.rim.blackberry.api.messagelist。您将需要实现 ApplicationMessage 来执行您所请求的操作。

有一个示例如何在 JDE 附带的示例源代码中执行此操作,项目名称为“MessageListDemo”。如果您想使用新的通知栏,(至少)OS 4.5 之前的所有 JDE 都会包含此示例应用程序。 OS6 的集成,请务必查看 6.0 MessageListDemo。

这是该过程的快速概述和裸露-骨骼示例。这是针对 6.0 的,但我相信 API 与 4.6 保持不变,并且与 4.5 相比略有变化)。不过,MessageListDemo 示例会更好,因为它更全面,并且包含您需要执行的所有操作,例如实现 MessageFolderListener 来检测用户何时打开您的自定义消息之一。

最后 - 我看到您提出了很多问题,但没有接受任何答案,甚至是有效的答案。如果此答案对您有帮助,请务必接受它,以确保人们不断回复您的问题。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文