Android is a software stack for mobile devices that includes an operating system, middleware and key applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.
Features
-
Application framework enabling reuse and replacement of components
-
Dalvik virtual machine optimized for mobile devices
-
Integrated browser based on the open source WebKit engine
-
Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)
-
SQLite for structured data storage
-
Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
-
GSM Telephony (hardware dependent)
-
Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
-
Camera, GPS, compass, and accelerometer (hardware dependent)
-
Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE
Android Architecture
The following diagram shows the major components of the Android operating system. Each section is described in more detail below.
Applications
Android will ship with a set of core applications including an email client, SMS program, calendar, maps, browser, contacts, and others. All applications are written using the Java programming language.
Application Framework
By providing an open development platform, Android offers developers the ability to build extremely rich and innovative applications. Developers are free to take advantage of the device hardware, access location information, run background services, set alarms, add notifications to the status bar, and much, much more.
Developers have full access to the same framework APIs used by the core applications. The application architecture is designed to simplify the reuse of components; any application can publish its capabilities and any other application may then make use of those capabilities (subject to security constraints enforced by the framework). This same mechanism allows components to be replaced by the user.
Underlying all applications is a set of services and systems, including:
- A rich and extensible set of Views that can be used to build an application, including lists, grids, text boxes, buttons, and even an embeddable web browser
-
Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data
- A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files
- A
Notification Manager
that enables all applications to display custom alerts in the status bar
- An
Activity Manager
that manages the lifecycle of applications and provides a common navigation backstack
For more details and a walkthrough of an application, see the Notepad Tutorial.
Libraries
Android includes a set of C/C++ libraries used by various components of the Android system. These capabilities are exposed to developers through the Android application framework. Some of the core libraries are listed below:
-
System C library - a BSD-derived implementation of the standard C system library (libc), tuned for embedded Linux-based devices
-
Media Libraries - based on PacketVideo's OpenCORE; the libraries support playback and recording of many popular audio and video formats, as well as static image files, including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG
-
Surface Manager - manages access to the display subsystem and seamlessly composites 2D and 3D graphic layers from multiple applications
-
LibWebCore - a modern web browser engine which powers both the Android browser and an embeddable web view
-
SGL - the underlying 2D graphics engine
-
3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use either hardware 3D acceleration (where available) or the included, highly optimized 3D software rasterizer
-
FreeType - bitmap and vector font rendering
-
SQLite - a powerful and lightweight relational database engine available to all applications
Android Runtime
Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language.
Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included "dx" tool.
The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management.
Linux Kernel
Android relies on Linux version 2.6 for core system services such as security, memory management, process management, network stack, and driver model. The kernel also acts as an abstraction layer between the hardware and the rest of the software
-------------------------------------------------------------------------------------------------------------------------------
什么是Android?
Android是运行在移动设备上的包含了操作系统、中间件以及核心应用的软件堆栈. Android SDK 提供了在Android平台上基于JAVA语言的工具和API以供应用程序的开发.
特征
-
应用框架 可重用及可扩展组件
-
Dalvik 虚拟机 为移动设备作了优化
-
集成的浏览器 基于开源引擎 WebKit
-
优化的图形界面 由2D图形库驱动;3D基于OpenGL ES 1.0规范(硬件加速选项)
-
SQLite 支持结构化的数据存储
-
媒体支持 支持常用的音频、视频以及图片格式(MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
-
GSM (如果硬件支持)
-
蓝牙, EDGE, 3G, and WiFi (如果硬件支持)
-
拍照, GPS, 指南针, 加速计 (如果硬件支持)
-
丰富的开发环境包括设备模拟器、调试工具、内存与性能监测以及基于Eclipse开发工具的插件
Android的架构
下图展示了Android操作系统上的主要组件. 接下来会对每个部分进行详细的说明.
Applications
Android将会搭载一套核心应用包括有邮件客户端、SMS、日历、地图、浏览器、联系人以及其他. 所有应用都是以JAVA语言编写的.
Application Framework
通过提供一个开放性的开发平台,Android为其开发者们提供了创建丰富、创新的应用的能力. 开发者可以自由地使用设备硬件、访问本地信息、运行后台服务、设置闹钟、向状态栏添加通知消息等以及更多功能.
开发者能够使用与核心应用程序所使用的相同的框架API. 应用架构被设计成易于重用; 一个应用程序发布它的功能,其他应用可以使用这个功能(受限于框架的强制安全约束). 这一同样的机制允许组件被用户所替换.
应用程序的下层是一组服务及系统程序, 包括:
应用程序的更多细节与详细讲解,请看 Notepad Tutorial.
依赖库
Android 包含了一组用于系统各种组件的C/C++库. 这些功能通过 Android 应用框架暴露给开发者. 以下列举了一些核心库:
-
系统C语言库 - 一个继承自BSD的标准C系统实现(libc),被调整成面向基于linux的嵌入式设备
-
多媒体库 - 基于PacketVideo的OpenCORE; 该库支持包括MPEG4, H.264, MP3, AAC, AMR, JPG以及PNG格式的音频、视频和静态图片
-
界面管理 - 管理显示子系统的入口以及各种应用的2D与3D图形层的无缝结合
-
LibWebCore - 驱动Android浏览器与一个内嵌web视图的最新的web浏览器引擎
-
SGL - 基本的2D图形引擎
-
3D libraries - 基于 OpenGL ES 1.0的实现; 该库使用3D加速(如果硬件支持)或包含了高度优化的3D软件光栅
-
FreeType - 位图与矢量字体的渲染
-
SQLite - 所有应用程序都可用的强大的、轻量级的关系型数据库引擎
Android运行
Android 包含了一组能够供以Java语言实现功能的核心库.
每个Android应用程序在Dalvik虚拟机实例下运行在他们自己的单独进程里. 所以Dalvik使设备能高效地运行多个虚拟机. Dalvik虚拟机执行.dex格式的文件,该文件针对小内存作了优化. Dalvik虚拟机是基于注册方式的, 并且是通过dx工具将java语言的类文件转换到.dex文件中运行的
Dalvik虚拟机依赖Linux内核的基本功能,例如线程和底层的内存管理.
Linux 内核
Android依赖Linux版本2.6的核心系统服务,例如安全、内存管理、进程管理、网络堆栈、驱动模型。 该内核也充当了硬件与软件栈之间的抽象层.
相关推荐
在本节"Android项目实战--手机卫士07--设置向导"中,我们将深入探讨如何在Android平台上开发一个功能完善的手机卫士应用,并重点介绍设置向导的实现过程。这个实战项目旨在帮助开发者理解如何将Android系统的核心...
1. 获取资源:首先,你需要找到名为"android-studio-ide-193.6514223-windows.exe"的压缩包文件,这是Android Studio的安装程序。确保你从官方渠道或可信的来源获取此文件,以保证安全。 2. 解压资源:下载完成后,...
【SetupWrized Android开机向导】是一个专门为Android设备设计的源码项目,旨在帮助开发者理解和实现设备开机时的引导流程。这个源码示例适用于那些希望在用户首次启动应用程序或设备时提供逐步指导的开发者。它是在...
1. 下载与解压:首先,你需要从Google官方网站下载"android-studio-ide-201.7042882-windows.zip"压缩文件,然后将其解压到你选择的目录下。 2. 安装步骤:双击解压后的"android-studio"文件夹中的"bin"目录下的...
在Android操作系统中,"开机向导"(Setup Wizard)是一个重要的功能,它引导新用户配置设备,使其能够根据个人需求进行使用。这个过程通常在设备首次启动或恢复出厂设置后出现,包括设置系统语言、连接WiFi网络等一...
下载“android-studio-2021.3.1.17-windows.exe”后,只需按照安装向导进行操作即可。安装过程中,可以选择自定义安装路径和组件,确保Java Development Kit(JDK)已安装且版本兼容。 五、使用技巧 1. **项目结构*...
在文件列表中,我们看到唯一的文件是"android-studio-ide-191.5977832-windows.exe",这是Android Studio在Windows系统上的安装程序。运行这个exe文件,用户可以按照向导进行安装,包括选择安装路径、组件选择以及...
下载“android-studio-2021.1.1.21-windows.exe”后,按照向导进行安装。安装过程中会提示设置安装路径、是否创建桌面快捷方式等选项。安装完成后,启动Android Studio,导入或创建新的项目,即可开始Android应用...
在该页面选择适用于Windows系统的“android-studio-ide-192.6200805-windows.exe”文件进行下载。 2. 安装:下载完成后,双击执行安装文件,按照向导提示进行操作。安装过程中,可以选择自定义安装路径,同时可选择...
1. **解压**: 首先,使用Linux终端中的tar命令解压文件,如`tar -zxvf android-studio-ide-201.6858069-linux.tar.gz`。 2. **移动到适当位置**: 解压完成后,通常会得到一个名为“android-studio”的文件夹。可以将...
1. **项目初始化**:打开Android Studio,选择“Start a new Android Studio project”。在新项目向导中,你需要填写项目名称(例如"FirstDemo")、公司域名以及选择项目保存的位置。在“Add an activity to Mobile...
这份“中文版Android程序员向导”对于想要进入Android开发领域的初学者,或者希望提升自己技能的开发者来说,无疑是一份宝贵的资源,它提供了全面、清晰的指导,有助于读者系统性地学习和掌握Android开发的核心知识...
- 下载完成后,用户需解压"AndroidStudio-ide-183.5522156-windows64(3.4.1).zip"文件,然后按照向导步骤进行安装。 - 安装完成后启动Android Studio,导入或创建新的Android项目。 - 利用提供的模板、示例...
总的来说,这个“android 向导欢迎页源码”示例是一个学习Android应用引导页设计的好起点。通过阅读和理解源码,开发者可以了解到如何组织和展示多个静态页面,以及如何结合ViewPager和Fragment实现滑动效果。同时,...
开机向导详细的代码 private final BroadcastReceiver homePressReceiver = new BroadcastReceiver() { final String SYSTEM_DIALOG_REASON_KEY = "reason"; final String SYSTEM_DIALOG_REASON_HOME_KEY = ...
在本Android项目实战中,我们将深入探讨如何构建一个手机卫士应用的核心功能——防盗逻辑以及设置向导。手机卫士是智能手机用户的重要安全工具,它能够保护设备免受恶意软件的侵害,同时提供一系列安全防护措施,如...
1. 下载并解压"android-studio-ide-191.5977832-windows.zip"到指定位置。 2. 运行安装程序,按照向导指示进行安装。 3. 设置安装路径和自定义选项,如是否添加桌面快捷方式、启动菜单项等。 4. 完成安装后,启动...
【Android项目实战--手机卫士完整源码part1】是一个针对Android平台的实践项目,旨在帮助开发者学习如何构建一个功能齐全的手机安全应用。这个项目包括了多个关键模块的源码,涵盖了手机卫士的核心功能,如电话拦截...
压缩包中的"android-studio-2020.3.1.25-windows.exe" 文件是Windows安装程序,用户双击后可以按照向导指引进行安装。安装过程中会询问一些配置选项,例如安装路径、是否创建桌面快捷方式等,安装完成后,开发者就...