如何通过代码判断Android操作系统

发布于 2024-10-01 00:15:16 字数 309 浏览 0 评论 0原文

可能的重复:
如何检索android sdk版本?

我正在开发 Android需要提供通知的应用程序。对于 2.2 之前的操作系统,我将使用轮询,但对于新的操作系统,我想使用新的 C2DM 方法。有没有办法通过代码检测应用程序安装在哪个操作系统上?或者有更好的方法来解决这个问题吗?

Possible Duplicate:
How to retrieve the android sdk version?

I'm developing an Android app that needs to provide notifications. For operating systems prior to 2.2 I'm going to use polling, but for new operating systems I want to utilize the new C2DM method. Is there a way to detect which operating system the application is installed on via code? Or is there a better way to go about this altogether?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文