Game Development Reference
In-Depth Information
The Application Framework
The application framework ties together the system libraries and the runtime, creating the user
side of Android. The framework manages applications and provides an elaborate structure within
which applications operate. Developers create applications for this framework via a set of Java
APIs that cover such areas as UI programming, background services, notifications, resource
management, peripheral access, and so on. All out-of-the-box core applications provided by
Android, such as the mail client, are written with these APIs.
Applications, whether they are UIs or background services, can communicate their capabilities
to other applications. This communication enables an application to reuse components of
other applications. A simple example is an application that needs to take a photo and then
perform some operations on it. The application queries the system for a component of another
application that provides this service. The first application can then reuse the component (for
example, a built-in camera application or photo gallery). This significantly lowers the burden on
programmers and also enables you to customize myriad aspects of Android's behavior.
As a game developer, you will create UI applications within this framework. As such, you will be
interested in an application's architecture and life cycle, as well as its interactions with the user.
Background services usually play a small role in game development, which is why they will not
be discussed in detail.
The Software Development Kit
To develop applications for Android, you will use the Android software development kit (SDK).
The SDK is composed of a comprehensive set of tools, documentation, tutorials, and samples
that will help you get started in no time. Also included are the Java libraries needed to create
applications for Android. These contain the APIs of the application framework. All major desktop
operating systems are supported as development environments.
Prominent features of the SDK are as follows:
ï?® debugger , capable of debugging applications running on a device or in
the emulator.
The
ï?® memory and performance profile to help you find memory leaks and
identify slow code.
A
ï?® device emulator , accurate though a bit slow at times, is based on
QEMU (an open source virtual machine for simulating different hardware
platforms). There are some options available to accelerate the emulator,
such as Intel Hardware Accelerated Execution Manager (HAXM), which we
discuss in Chapter 2.
The
ï?® Command - line utilities to communicate with devices.
ï?® Build scripts and tools to package and deploy applications.
The SDK can be integrated with Eclipse, a popular and feature-rich open source Java integrated
development environment (IDE). The integration is achieved through the Android Development
Tools (ADT) plug-in, which adds a set of new capabilities to Eclipse for the following purposes:
to create Android projects; to execute, profile, and debug applications in the emulator or on a
 
Search WWH ::




Custom Search