A (175)

(Tuis.) #1

62 CHAPTER 3: An Introduction to the Android Application Development Platform


How the Android Platform is Structured: Java, XML, and


New Media on Top of Linux


An Android development platform is a multi-layered collection of software components that includes
an OS (Linux) with a massive number (thousands) of high-level function libraries (Java code) that
exist “on top of” that OS “kernel.” These Java libraries simplify your task of communicating with
Android’s Linux OS kernel, which is inherently complex, as you might well imagine.


On top of this more complex Java code libraries layer, you have a higher-level layer of XML mark-up.
XML mark-up allows you to more easily define your application’s Java object structures, as well as
any constants that will be used in your Java program logic. I’ll cover these Java concepts of libraries
and packages, as well as what Java objects, constants, classes, and methods are, in Chapter 5.


Finally, your XML mark-up references your even higher-level application UI design, styles, theme,
and new media assets, which I will be covering in Chapters 6 through 12. These design-oriented
assets allow you to control how your Android app looks, sounds, and functions, and define your user
experience. I show this hierarchy visually, in Figure 3-1.


Figure 3-1. Android OS hierarchy, from Linux Kernel, to Java Libraries, to XML Definitions, to New Media Assets


Details Regarding Android’s Platform Structure


The foundation on which Android is built is the carefully coded, and painstakingly tested, Linux.
Linux and its core services manage the physical hardware for the smartphone, tablet, eBook reader,
smartwatch or iTV set, and give Android applications complete access to the features of each
consumer electronics device, including the GPS, touchscreen, memory, data storage, camera, gyro,
compass, accelerometer, Bluetooth, wi-fi, NFC, USB port, and more.


Linux doesn’t do it all alone, however! Android has a wide array of Java API libraries, which
provide higher-level customized functions and services for things like SQLite database
management, 2D imaging, 3D rendering, digital audio playback, digital video streaming, animation,
Bluetooth, and more.

Free download pdf