Setting Up Android Development Environment Using Eclipse


Android Development Tools (ADT) is a plug-in for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications.

ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add components based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) APKs in order to distribute your application.

Developing in Eclipse with ADT is highly recommended and is the fastest way to get started. With the guided project setup it provides, as well as tools integration, custom XML editors, and debug output pane, ADT gives you an incredible boost in developing Android applications.

The sections below provide instructions on how to download and install ADT into your Eclipse environment.

Preparing Your Development Computer

ADT is a plug-in for the Eclipse IDE. Before you can install or use ADT, you must have a compatible version of Eclipse installed on your development computer.

If Eclipse is already installed on your computer, make sure that you have Eclipse 3.4 (Ganymede) or 3.5 (Galileo) version that is compatible with ADT and the Android SDK.

Continue reading

Advertisements

Android Virtual Devices


 

Android Virtual Devices (AVDs) are configurations of emulator options that let you better model an actual device.

Each AVD is made up of:

  • A hardware profile.  You can set options to define the hardware features of the virtual device. For example, you can define whether the device has a camera, whether it uses a physical QWERTY keyboard or a dialling pad, how much memory it has, and so on.
  • A mapping to a system image.  You can define what version of the Android platform will run on the virtual device. You can choose a version of the standard Android platform or the system image packaged with an SDK add-on.
  • Other options.  You can specify the emulator skin you want to use with the AVD, which lets you control the screen dimensions, appearance, and so on. You can also specify the emulated SD card to use with the AVD.
  • A dedicated storage area on your development machine, in which is stored the device’s user data (installed applications, settings, and so on) and emulated SD card.

You can create as many AVDs as you need, based on the types of devices you want to model and the Android platforms and external libraries you want to run your application on.

In addition to the options in an AVD configuration, you can also specify emulator command-line options at launch or by using the emulator console to change behaviors or characteristics at run time.

The easiest way to create an AVD is to use the graphical AVD Manager, which you can launch from Eclipse or from the command line using the android tool. The android tool is provided in the tools/ directory of the Android SDK. When you run the android tool without options, it launches the graphical AVD Manager.

 

Creating an AVD From Eclipse

Continue reading

Understanding Android Manifest.xml File


 

Every Android application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application’s code. Among other things, the manifest does the following:

  • It names the Java package for the application. The package name serves as a unique identifier for the application.
  • It describes the components of the application — the activities, services, broadcast receivers, and content providers that the application is composed of. It names the classes that implement each of the components and publishes their capabilities (for example, which Intent messages they can handle). These declarations let the Android system know what the components are and under what conditions they can be launched.
  • It determines which processes will host application components.
  • It declares which permissions the application must have in order to access protected parts of the API and interact with other applications.
  • It also declares the permissions that others are required to have in order to interact with the application’s components.
  • It lists the Instrumentation classes that provide profiling and other information as the application is running. These declarations are present in the manifest only while the application is being developed and tested; they’re removed before the application is published.
  • It declares the minimum level of the Android API that the application requires.
  • It lists the libraries that the application must be linked against.

Continue reading

What is Android ???


Android is a software stack for mobile devices that includes an operating system, middleware and key applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.

Features

  • Application framework enabling reuse and replacement of components
  • Dalvik virtual machine optimized for mobile devices
  • Integrated browser based on the open source WebKit engine
  • Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)
  • SQLite for structured data storage
  • Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
  • GSM Telephony (hardware dependent)
  • Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
  • Camera, GPS, compass, and accelerometer (hardware dependent)
  • Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE

Android Architecture

The following diagram shows the major components of the Android operating system. Each section is described in more detail below.

Android System Architecture

Continue reading