如何实现多个Android应用程序的推送通知?

发布于 2024-09-07 13:17:41 字数 192 浏览 5 评论 0原文

我们的产品仍然以操作系统 1.5+ 为目标,因此 Froyo 中的 C2DM 不是一个选择。

我认为将持久 TCP 连接包装在服务中是可行的。但我仍然想知道如何使用一项服务来接收多个应用程序的通知。我不想为每个应用程序创建服务和连接。

我应该尝试在所有应用程序中注册相同的服务,还是将服务作为单个应用程序发布?

提前致谢。

Our products still target OS 1.5+, so C2DM in Froyo is not an option.

I think wrap a persistent TCP connection in a service would be feasible. But I'm still wondering how to use one service to receive notifications for multiple applications. I don't want to create service and connection for each of my apps.

Should I try to register the same service in all my apps, or release the service as a single app?

Thanks in advance.

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

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

发布评论

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

评论(1

撩起发的微风 2024-09-14 13:17:41

您可以查看 Urban Airship 在 Android 2.2 之前版本的推送通知实现方面所做的工作。他们有一个名为 AirMail 控制面板的集中式应用程序,它可以为使用其推送服务的多个应用程序配置推送设置。

文档位于此处

You can have a look at what Urban Airship has done with their implementation of push notifications for Android pre-2.2. They have a centralized application called AirMail Control Panel which configures push settings for multiple applications that use their push service.

The documentation is here.

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