The Android SDK comes with five major components: the Android SDK License Agreement, the Android Documentation, Application Framework, Tools, and Sample Applications.
Understanding the Android SDK License Agreement
Before you can download the Android SDK, you must review and agree to the Android SDK License Agreement. This agreement is a contract between you (the developer) and Google (copyright holder of the Android SDK).
Even if someone at your company has agreed to the Licensing Agreement on your behalf, it is important for you, the developer, to be aware of a few important points:
Reading the Android SDK Documentation
A local copy of the Android documentation is provided in the /docs subfolder on disk.
The documentation is now divided into seven main sections:
The Android SDK documentation.
The Android documentation is provided in HTML format locally and online . Certain networked features of the Android documentation (such as the Blog and Video tabs) are only available online.
Exploring the Android Application Framework
The Android application framework is provided in the android.jar file. The Android SDK is made up of several important packages, as shown in Table.
Important Packages in the Android SDK
There is also an optional Google APIs Add-On, which is an extension to the Android SDK that helps facilitate development using Google Maps and other Google APIs and services. For example, if you want to include the MapView control in your application, you need to install and use this feature. This Add-On corresponds to the com. google.* package (including com.google.android.maps) and requires agreement to additional Terms of Service and registration for an API Key. For more information on the Google APIs Add-On.
Getting to Know the Android Tools
The Android SDK provides many tools to design, develop, debug, and deploy your Android applications. The Eclipse Plug-In incorporates many of these tools seamlessly into your development environment and provides various wizards for creating and debugging Android projects.
Settings for the ADT plug-in are found in Eclipse under Window, Preferences, Android. Here you can set the disk location where you installed the Android SDK and tools, as well as numerous other build and debugging settings.
The ADT plug-in adds a number of useful functions to the default Eclipse IDE. Several new buttons are available on the toolbar, including buttons to
These features are accessible through the Eclipse toolbar buttons shown in Figure.
Android features added to the Eclipse toolbar.
There is also a special Eclipse perspective for debugging Android applications called DDMS (Dalvik Debug Monitor Server).You can switch to this perspective within Eclipse by choosing Window, Open Perspective, DDMS or by changing to the DDMS perspective in the top-right corner of the screen. We talk more about DDMS later in this chapter. After you have designed an Android application, you can also use the ADT plug-in for Eclipse to launch a wizard to package and sign your Android application for publication. We talk more about this in Chapter “Selling Your Android Application.”
Android SDK and AVD Manager
The Android SDK and AVD Manager, shown in Figure, is a tool integrated into Eclipse. This tool performs two major functions: management of multiple versions of the Android SDK on the development machine and management of the developer’s Android Virtual Device (AVD) configurations.
The Android SDK and AVD Manager.
Much like desktop computers, different Android devices run different versions of the Android operating system. Developers need to be able to target different Android SDK versions with their applications. Some applications target a specific Android SDK, whereas others try to provide simultaneous support for as many versions as possible.
The Android SDK and AVD Manager facilitate Android development across multiple platform versions simultaneously. When a new Android SDK is released, you can use this tool to download and update your tools while still maintaining backward compatibility and use older versions of the Android SDK.
The tool also manages the AVD configurations. To manage applications in the Android emulator, you must configure an AVD. This AVD profile describes what type of device you want the emulator to simulate, including which Android platform to support. You can specify different screen sizes and orientations, and you can specify whether the emulator has an SD card and, if so, what capacity.
The Android emulator, shown in Figure, is one of the most important tools provided with the Android SDK. You will use this tool frequently when designing and developing Android applications. The emulator runs on your computer and behaves much as a mobile device would. You can load Android applications into the emulator, test, and debug them.
The Android emulator.
The emulator is a generic device and is not tied to any one specific phone configuration. You describe the hardware and software configuration details that the emulator is to simulate by providing an AVD configuration.
Dalvik Debug Monitor Server (DDMS)
The Dalvik Debug Monitor Server (DDMS) is a command-line tool that has also been integrated into Eclipse as a perspective. This tool provides you with direct access to the device—whether it’s the emulator virtual device or the physical device. You use DDMS to view and manage processes and threads running on the device, view heap data, attach to processes to debug, and a variety of other tasks.
Using DDMS integrated into an Eclipse perspective.
Android Debug Bridge (ADB)
The Android Debug Bridge (ADB) is a client-server tool used to enable developers to debug Android code on the emulator and the device using a standard Java IDE such as Eclipse. The DDMS and the Android Development Plug-In for Eclipse both use the ADB to facilitate interaction between the development environment and the device (or emulator). Developers can also use ADB to interact with the device file system, install Android applications manually, and issue shell commands. For example, the sqlite3 shell commands enable you to access device database.The Application Exerciser Monkey commands generate random input and system events to stress test your application. One of the most important aspects of the ADB for the developer is its logging system (Logcat).
Android Hierarchy Viewer
The Android Hierarchy Viewer, a visual tool that illustrates layout component relationships, helps developers design and debug user interfaces. Developers can use this tool to inspect the View properties and develop pixel-perfect layouts. For more information about user interface design and the Hierarchy Viewer, see Chapter “Designing User Interfaces with Layouts.”
Screenshot of the Android Hierarchy Viewer in action.
Android SDK provides a number of other tools provided with the Android SDK. Many of these tools provide the underlying functionality that has been integrated into Eclipse using the Android Development Tools (ADT) plug-in. However, if you are not using Eclipse, these tools may be used on the command-line.
Other tools are special-purpose utilities. For example, the Draw Nine-patch tool enables you to design stretchable PNG images, which is useful for supporting different screen sizes. Likewise, the layout opt tool helps developers optimize their user interfaces for performance. We discuss a number of these special tools in later chapters as they become relevant.
Exploring the Android Sample Applications
The Android SDK provides many samples and demo applications to help you learn the ropes of Android Development. Many of these demo applications are provided as part of the Android SDK and are located in the /samples subdirectory of the Android SDK. You can find more sample applications on the Android Developer website under the Resources tab.
Some of the most straightforward demo applications to take a look at are:
There are numerous other sample applications, but they demonstrate very specific Android features that are discussed later in this book.
Setting Up Your Android Development Environment
Writing Your First Android Application
Understanding The Anatomy Of An Android Application
Defining Your Application Using The Android Manifest File
Managing Application Resources
Exploring User Interface Screen Elements
Designing User Interfaces With Layouts
Drawing And Working With Animation
Using Android Data And Storage Apis
Sharing Data Between Applications With Content Providers
Using Android Networking Apis
Using Android Web Apis
Using Location-based Services (lbs) Apis
Using Android Multimedia Apis
Using Android Telephony Apis
Using Android 3d Graphics With Opengl Es
Using The Android Ndk
Using Android’s Optional Hardware Apis
Working With Notifications
Working With Services
Extending Android Application Reach
Managing User Accounts And Synchronizing User Data
Handling Advanced User Input
Targeting Different Device Configurations And Languages
The Mobile Software Development Process
Designing And Developing Bulletproof Android Applications
Testing Android Applications
Selling Your Android Application
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.