A (175)

(Tuis.) #1
CHAPTER 3: An Introduction to the Android Application Development Platform 63

The higher-level Java functional libraries are the ones that Android app developers use to create
their applications. This is so that developers do not have to “talk” directly to the low-level operating
system functions. This is done so that application development becomes an order of magnitude
easier! You will be learning about all of the major Java functional libraries that are used to develop
Android applications over the course of this book, starting with this chapter.


The Android platform also includes a large number of “end-user” applications, which Android
device users have come to expect on their Android device. Examples of these include a phone
management utility, an e-mail client, various social media platform clients, a contact manager, a web
browser, an alarm clock, a calendar, Google Maps, Google Search, media player, basic games, and
so forth.


Finally, Android supports all of those popular open source rich media formats that you will want to
use in your applications, including the powerful ON2 VP8 video codec, now in Android 4. ON2 was
acquired by Google, and VP8 was released as an open source video codec called WebM, which you
can find in Android as well as browsers such as Firefox and Chrome.


Both the WebM and the MPEG4 H.264 AVC digital video codec’s “Quality to File Size Ratio,” and
therefore their playback performance, are pretty darn impressive for open source video codecs. For
more information regarding the new media formats that are supported in Android, you can visit:


http://developer.android.com/guide/appendix/media-formats.html


The next section of this chapter introduces a Java Dalvik Virtual Machine (VM), which optimizes your
Java code for low-power embedded (portable) consumer electronics devices. Later in this chapter,
I show you how to create your first Android application, and we will take a look at how Eclipse ADT
wants you to organize assets via a highly structured application project hierarchy.


Note In this book, you will build apps using a combination of XML and Java, which sit in layers on top of the
operating system, as shown in Figure 3-1. However, you could, if you wished, access the operating system
and its services directly, using a lower-level language such as C or C++, by utilizing the Android Native
Development Kit (NDK), rather than the higher-level Software Development Kit (Android SDK), which we
will be using for this book. You might consider this “under-the-hood” approach for an application that needs
the utmost speed, such as a game or a real-time heart-monitoring program, but this NDK is beyond the scope
of this book.

Now let’s take a look at the runtime, or compiled version, of your Android application, and how it
uses Java bytecode with the Dalvik VM to optimize the performance of your Android app!


Compiled App: Runtime Executable Java Bytecode


Everything in Android’s development environment, as well as all the included applications, is created
by using a combination of Java code and XML markup. This is compiled by Eclipse ADT, into a
Java “bytecode” version of your app that will be run using a runtime utility that is included with the
Android OS. Eclipse (using Android’s SDK) creates this inside of the DEX file format (similar to an
EXE file).

Free download pdf