第一周

Android System Architecture(Android 系统架构)

Android学习笔记 --翻译
Android is an open source, Linux-based software stack created for a wide array of devices and form factors.
Android 是一个开源的,基于Linux的用于针对不同尺寸的移动设备创建界面的软件堆栈。

系统架构:

  1. System Apps
  2. Java API Framework
    • View System
    • Resource Manager,
    • Notification Manager
    • Activity Manager
    • Content Providers
  3. Native C/C++ Libraries
  4. Android Runtime
  5. Hardware Abstraction Layer(HAL)
  6. Linux Kernel
  7. Power Management

Application层: 也就是应用层,不仅包括通话短信联系人这种系统级的应用,还包括用户自己安装的一些第三方应用
Framework层:这一层大部分用Java写的,包括系统服务和四大组件
Library层:这一层大部分都是C/C++写的,主要是虚拟机,还有一些三方库比如SQLite, WebKit
HAL层:硬件抽象层,
Linux内核层:包含Linux内核和一些驱动,比如说蓝牙驱动,Camera驱动等等,这个Binder驱动也是在这一层

Android Platform

The Android platform provides a framework API that applications can use to interact with the underlying Android system.
The framework API consists of:

  1. A core set of packages and classes
  2. A set of XML elements and attributes for declaring a manifest file
  3. A set of XML elements and attributes for declaring and accessing resources
  4. A set of Intents
  5. A set of permissions that applications can request, as well as permission enforcements included in the system

Android platform 提供了一个让应用可以和底层Android系统进行交互的API框架。

Android Platform Updates

Updates to the framework API are designed so that the new API remains compatible with earlier versions of the API.

two case:

  1. Most changes in the API are additive and introduce new or replacement functionality ==>In this case, the older replaced parts are deprecated but are not removed
  2. In a very small number of cases, parts of the API may be modified or removed ==> In this case, typically such changes are only needed to ensure API robustness and application or system security

更新API框架被设计以便于新老API可以兼容。

有两种情况:

  1. 绝大多数API更新是添加或替换新功能。
  2. 极少数情况是移除或修改部分API

API Levels and Android Platform Versions

API Level

  • An integer value
  • It uniquely identifies the framework API revision offered by a version of the Android platform

API Level ≠ Android Platform Version

Uses of API Level in Android

minSdkVersion:最小的API Level。
targetSdkVersion:目标SDK版本,建议使用最新。
compileSdkVersion:编译工程的SDK版本。不应该比targetSdkVersion低。
maxSdkVersion:最大的API Level。

相关文章: