Android Tutorial

Google is the leading company to develop and promote Android, It is an amazing mobile platform that combines an operating system, middleware and powerful application development Android Inc was founded in Palo Alto of California, U.S. by Andy Rubin, Rich miner, Nick sears and Chris White in 2003. Later Android Inc. was acquired by Google in 2005. After original release there have been number of updates in the original version of Android.

Android Basics - An Introduction to 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.

Android Features

  1. Application framework enabling reuse and replacement of components
  2. Dalvik virtual machine optimized for mobile devices
  3. Integrated browser based on the open source WebKit engine
  4. Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)
  5. SQLite for structured data storage
  6. Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
  7. GSM Telephony (hardware dependent)
  8. Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
  9. Camera, GPS, compass, and accelerometer (hardware dependent)
  10. Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE
Google Android will be available with a host of features that includes a web browser, email client, calendar, contacts, SMS feature, maps and others. All the Google Android applications are written in Java and run on Dalvik virtual machine, which itself functions on top of a Linux kernel.

ANDROID ARCHITECTURE

The Android OS can be referred to as a software stack of different layers, where each layer is a group of sveral program components. Together it includes operating system, middleware and important applications. Each layer in the architecture provides different services to the layer just above it.

The fully integrated Android package comprising an OS, middleware, applications and user friendly interface is expected to considerably speed-up product development while lowering the cost of mobile services development.

APPLICATIONS

Android will ship with a set of core applications including an email client, SMS program, calendar, maps, browser, contacts, and others. All applications are written using the Java programming language.

APPLICATION FRAMEWORK

Developers have full access to the same framework APIs used by the core applications. The application architecture is designed to simplify the reuse of components; any application can publish its capabilities and any other application may then make use of those capabilities (subject to security constraints enforced by the framework). This same mechanism allows components to be replaced by the user. Underlying all applications is a set of services and systems, including:

  1. A rich and extensible set of Views that can be used to build an application, including lists, grids, text boxes, buttons, and even an embeddable web browser
  2. Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data
  3. A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files
  4. A Notification Manager that enables all applications to display custom alerts in the status bar
  5. An Activity Manager that manages the lifecycle of applications and provides a common navigation backstack

ANDROID RUNTIME

Android Runtime consists of Dalvik Virtual machine and Core Java libraries.Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language.

Dalvik Virtual Machine

Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included "dx" tool.

The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management.

Core Java Libraries

These are different from Java SE and Java ME libraries. However these libraries provides most of the functionalities defined in the Java SE libraries.

LINUX KERNEL

Android relies on Linux version 2.6 for core system services such as security, memory management, process management, network stack, and driver model. The kernel also acts as an abstraction layer between the hardware and the rest of the software stack.

The basic layer is the Linux kernel. The whole Android OS is built on top of the Linux 2.6 Kernel with some further architectural changes made by Google. It is this Linux that interacts with the hardware and contains all the essential hardware drivers. Drivers are programs that control and communicate with the hardware. For example, consider the Bluetooth function. All devices has a Bluetooth hardware in it. Therefore the kernel must include a Bluetooth driver to communicate with the Bluetooth hardware. The Linux kernel also acts as an abstraction layer between the hardware and other software layers. Android uses the Linux for all its core functionality such as Memory management, process management, networking, security settings etc.

DZone provide industrial training on live project to MCA,B-Tech students on web and mobile apps and give them a exposure to work on live projects.