Android框架揭秘
由金泰延、宋亨周、朴知勋、李白、林起永所写的《Android框架揭秘
》通过对Android系统源代码的分析,主要介绍Android框架的初始化过程及
主要组件的工作原理。作者直接分析和整理了Android框架的主要源代码,
并详细讲解了理解框架工作原理所需的各种基础知识和构成实际Android平
台骨干的服务框架。其中的主要内容包括:通过启动程序了解Android框架
的概要,移植Android以及如何开发适合各种机器的应用程序,分析Android
框架所需的基础知识,jni(java native interface)与binder基础知识,
Zygote、Service Manager Service Server等Android核心组件,Android服
务框架的结构与理解,通过Camera Service、Activity Manager Service等
服务分析实际的Android服务等。
此处只有第二章、第八章样章和目录下载
[android.开发书籍].Beginning.Android.2.(Apress,.2010,.1430226293).pdf
Contents at a Glance
■Chapter 1: The Big Picture......................................................................................................................... 1
■Chapter 2: Projects and Targets ................................................................................................................ 5
■Chapter 3: Creating a Skeleton Application............................................................................................. 17
■Chapter 4: Using XML-Based Layouts...................................................................................................... 23
■Chapter 5: Employing Basic Widgets ....................................................................................................... 29
■Chapter 6: Working with Containers........................................................................................................ 39
■Chapter 7: Using Selection Widgets......................................................................................................... 59
■Chapter 8: Getting Fancy with Lists......................................................................................................... 75
■Chapter 9: Employing Fancy Widgets and Containers ............................................................................. 95
■Chapter 10: The Input Method Framework ............................................................................................ 117
■Chapter 11: Applying Menus.................................................................................................................. 125
■Chapter 12: Fonts................................................................................................................................... 137
■Chapter 13: Embedding the WebKit Browser......................................................................................... 141
■Chapter 14: Showing Pop-Up Messages................................................................................................ 149
■Chapter 15: Dealing with Threads ......................................................................................................... 155
■Chapter 16: Handling Activity Life Cycle Events .................................................................................... 167
■Chapter 17: Creating Intent Filters ........................................................................................................ 171
■Chapter 18: Launching Activities and Subactivities .............................................................................. 177
■Chapter 19: Handling Rotation............................................................................................................... 185
■Chapter 20: Working with Resources .................................................................................................... 197
■Chapter 21: Using Preferences .............................................................................................................. 213
■Chapter 22: Managing and Accessing Local Databases ........................................................................ 225
■Chapter 23: Accessing Files................................................................................................................... 237
■Chapter 24: Leveraging Java Libraries.................................................................................................. 245
■Chapter 25: Communicating via the Internet ......................................................................................... 253
■Chapter 26: Using a Content Provider.................................................................................................... 259
■Chapter 27: Building a Content Provider ............................................................................................... 265
■Chapter 28: Requesting and Requiring Permissions ............................................................................. 275
■Chapter 29: Creating a Service .............................................................................................................. 279
■Chapter 30: Invoking a Service.............................................................................................................. 285
■Chapter 31: Alerting Users via Notifications.......................................................................................... 289
■Chapter 32: Accessing Location-Based Services................................................................................... 295
■Chapter 33: Mapping with MapView and MapActivity........................................................................... 301
■Chapter 34: Handling Telephone Calls ................................................................................................... 311
■Chapter 35: Development Tools ............................................................................................................. 315
■Chapter 36: Handling Multiple Screen Sizes.......................................................................................... 331
■Chapter 37: Dealing with Devices.......................................................................................................... 353
■Chapter 38: Handling Platform Changes................................................................................................ 359
■Chapter 39: Where Do We Go from Here? .............................................................................................. 367
■Index ...................................................................................................................................................... 369
Android Platform Developer‘s Guide.doc
目录如下:
Android Platform Developer's Guide 4
About this Guide 4
Intended Audience 4
Getting Started with Android 4
Android Build System 4
In this document 4
Building the Android Platform 6
Building the Android Kernel 8
Build Variants 9
Configuring a New Product 10
In this document 10
Detailed Instructions 11
New Product File Tree 13
Product Definition Files 14
Build Cookbook 15
In this document 15
Building a simple APK 16
Building a APK that depends on a static .jar file 16
Building a APK that should be signed with the platform key 16
Building a APK that should be signed with a specific vendor key 17
Adding a prebuilt APK 17
Adding a Static Java Library 18
Android.mk Variables 18
Creating Release Keys and Signing Builds 26
In this document 26
Introduction 27
Generating keys 27
Signing a build for release 28
Customization 29
In this document 29
Boot Screen Customization 29
Network Customization Platform 30
Customizing pre-loaded applications 31
Customizing browser bookmarks 32
Email Provider Customization 34
Platform Themes 37
Bring Up 38
1. Confirm a Clean Installation of a Basic Linux Kernel 38
2. Modify Your Kernel Configuration to Accommodate Android Drivers 38
3. Write Drivers 38
4. Burn Images to Flash 39
5. Boot the kernel and mount the RAMdisk. 39
6. Debug Android-specific init programs on RAMdisk 39
7. Verify that applications have started 40
8. Pulling it all together 40
Android Init Language 41
Display Drivers 46
In this document 46
Functionality 46
Implementing Your Own Driver (Driver Template) 47
Troubleshooting 54
Keymaps and Keyboard Input 54
In this document 54
Functionality 55
Key Layout Map 56
Key Character Map 58
Implementing Your Own Driver (Driver Template) 61
Sample Implementation 64
Lights 65
In this document 65
Building a Lights Library 66
Interface 66
light_state_t Struct Reference 69
Data Fields 69
Detailed Description 69
Field Documentation 69
Audio 70
In this document 70
Building an Audio Library 71
Interface 72
Camera 78
In this document 78
Building a Camera Library 79
Sequence Diagrams 80
CameraHardwareInterface.h File Reference 82
Namespaces 82
Data Structures 82
Typedefs 83
Functions 83
Power Management 83
Introduction 84
Wake Locks 85
Driver API 87
User-space API 87
Types of Wake Locks 88
Exploring a Wake Lock Example 88
PowerManager class 89
Registering Drivers with the PM Driver 89
Early Suspend 90
Sensors 90
In this document 90
Building a Sensor Library 91
Interface 91
sensors.h File Reference 91
Data Structures 91
Radio Layer Interface 92
In this document 92
RIL Initialization 94
RIL Interaction 94
Implementing the RIL 96
RIL Functions 97
Dalvik 100
In this document 100
Core Libraries 100
JNI Call Bridge 101
Interpreter 102
Mterp Interpreter Structure 102
Getting Started With Mterp 103
Replacing Stubs 105
Interpreter Switching 106
Testing 106
Testing and Debugging 107
Instrumentation Testing 107
In this document 107
Instrumentation Framework 108
Platform Test Suites 109
Running Tests 110
Writing Tests 114
Debugging with GDB 116
In this document 116
Debugging 117
Just-In-Time Debug Feature 119
Debugging Native Code 120
In this document 120
Capturing logs 120
Debug Scenarios 121
Debugging with tcpdump and other tools 128
Installing tcpdump 128
Running tcpdump 129
Other network debugging commands 130