Android ---Check System Version at Runtime(在软件运行时检查判断系统版本)
来源:互联网 发布:淘宝衣服卖点模板 编辑:程序博客网 时间:2024/06/06 13:22
Android为我们提供了一个常量类Build,其中最主要是Build中的两个内部类VERSION和VERSION_CODES
VERSION表示当前系统版本的信息,其中就包括SDK的版本信息,用于成员SDK_INT表示;
对于VERSION_CODES在SDK开发文档中时这样描述的,Enumeration of the currently known SDK version codes. These are the values that can be found in SDK
. Version numbers increment monotonically with each official platform release.
在我们自己开发应用过程中,常常使用如下的代码形式判断运行新API还是旧的API:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { // 包含新API的代码块 } else { // 包含旧的API的代码块 }
以下为版本号:
Applications targeting this or a later release will get these new changes in behavior:
- The
Service.onStartCommand
function will return the newSTART_STICKY
behavior instead of the old compatibilitySTART_STICKY_COMPATIBILITY
.
Applications targeting this or a later release will get these new changes in behavior:
- The application's notification icons will be shown on the new dark status bar background, so must be visible in this situation.
Applications targeting this or a later release will get these new changes in behavior:
- Content Providers: The default value of
android:exported
is nowfalse
.
- Android ---Check System Version at Runtime(在软件运行时检查判断系统版本)
- 运行时系统(Runtime System)
- 安装ORACLE 10G时,报告操作系统版本(operating system version)检查失
- 安装ORACLE 10G时,报告操作系统版本(operating system version)检查失败之案例一
- 检查软件版本运行时提示丢失 msvcr100d.dll
- VBScript - To Check your Versions - 检查你的运行版本
- 如何在安装或运行时检查 S60 平台版本
- 如何在安装或运行时检查S60平台版本
- Build.VERSION.SDK_INT--android版本判断
- System 系统类与RunTime 应用程序运行的环境
- android 检查软件是否有更新版本
- 运行时版本与平台(Runtime Versions and Platforms)
- android 6.0 Runtime Permissions Check
- 处理运行时系统设置变化(Handling Runtime Changes)
- check(查看)cygwin的version(版本信息)
- android 检查服务是否在运行
- android运行时权限(Android Runtime Permission )
- How to check permissions at runtime without throwing SecurityException?
- AS3组件
- flex4事件监听与自定义事件分发(三)
- Python 过滤列表
- 高级进阶DB2(第2版)——内部结构、高级管理与问题诊断
- 跟Google学习Android开发-起始篇-用碎片构建一个动态的用户界面(4)
- Android ---Check System Version at Runtime(在软件运行时检查判断系统版本)
- Android排错:has leaked window com.android.internal.policy.impl.PhoneWindow$ that was originally added
- Waveform Audio 驱动(Wavedev2)之:WAV API模拟
- python解决乱码问题
- 波士顿矩阵的局限
- AS3有效组件库
- JS修改css样式style浅谈(转)
- struts2的配置和使用
- springMvc,Mybatis,velocity 的整合