Android Overview

What is Android?

"The first truly open and comprehensive platform for mobile devices. It includes an operating system, user-interface and applications — all of the software to run a mobile phone but without the proprietary obstacles that have hindered mobile innovation."
- Andy Rubin (Ex-Senior Vice President of Android at Google)
       
Android is an ecosystem made up of a combination of three components:
  • An open-source development platform for creating and deploy applications
  • A free, open-source operating system for mobile devices as smartphones, tablets, smartwatches etc.
  • Devices, particularly mobile phones and watches, that run the Android operating system and the applications created for it

Android SDK

            The Android software development kit (SDK) includes a comprehensive set of development tools including a debugger, software libraries of prewritten code, a device emulator, documentation, sample code, and tutorials. 
  • Development tools - The SDK includes several development tools:
    1. AVD Manager - The AVD hosts an emulator running a particular build of Android, letting you specify the supported SDK version, screen resolution, amount of SD card storage available, and available hardware capabilities.
    2. Android SDK Manager - The Android SDK Manager can be used to see which version of the SDK you have installed and to install new SDKs when they are released.
    3. The Android Emulator - An implementation of the Android VM designed to run within an android virtual device (AVD) on your development computer.
    4. Dalvik Debug Monitoring Service (DDMS) - Use the DDMS to monitor and control the Emulators on which you’re debugging your applications.
    5. Android Debug Bridge (ADB) - A client-server application that provides a link to virtual and physical devices. It lets you copy files, install compiled application packages (.apk), and run shell commands.
    6. Logcat -  A utility used to view and filter the output of the Android logging system.
    7. Android Asset Packaging Tool (AAPT) - Constructs the distributable Android package files (.apk).
    8. Traceview - Graphical analysis tools for viewing the trace logs from your Android application.
    9. Hierarchy Viewer - Provides both a visual representation of a layout’s View hierarchy to debug and optimize your UI, and a magnified display to get your layouts pixel-perfect.
    10. Lint - A tool that analyzes your application and its resources to suggest improvements and optimizations.
    11. Monkey and Monkey Runner Monkey runs within the VM, generating pseudo-random user and system events. Monkey Runner provides an API for writing programs to control the VM from outside your application.
    12. ProGuard - A tool to shrink and obfuscate your code by replacing class, variable, and method names with semantically meaningless alternatives .
  • The Android APIs - The core of the SDK is the Android API libraries that provide developer access to the Android stack. These are the same libraries that Google uses to create native Android applications.
  • Documentation - The SDK includes extensive code-level reference information detailing exactly what’s included in each package and class and how to use them.
  • Sample code - The Android SDK includes a selection of sample applications that demonstrate some of the possibilities available with Android, as well as simple programs that highlight how to use individual API features.

Android Software Stack

            Android provides a rich development architecture. Android is structured in the form of a software stack comprising applications, an operating system, run-time environment, middle-ware, services and libraries.
  •  Linux Kernel - The foundation of the Android platform is the Linux kernel. The Linux Kernel provides a level of abstraction between the device hardware and the upper layers of the Android software stack. Based on Linux version 2.6, the kernel provides preemptive multitasking, low-level core system services such as memory, process and power management.
  • Hardware Abstraction Layer (HAL) - The hardware abstraction layer (HAL) provides standard interface that expose device hardware capabilities to higher - level Java API framework. When a framework API makes a call to access device hardware, the Android system loads the library module for that hardware component.
  • Android Runtime - Each app runs in its own process and with its own instance of the Android Runtime (ART). ART is written to run multiple virtual machines on low-memory devices by executing DEX files, a bytecode format designed specially for Android. Android also includes a  set of core runtime libraries :
    1. android.app - Provides access to the application model and is the cornerstone of all Android applications.
    2. android.content - Facilitates content access, publishing and messaging between applications and application components.
    3. android.database - Used to access data published by content providers and includes SQLite database management classes.
    4. android.graphics - A low-level 2D graphics drawing API including colors, points, filters, rectangles and canvases.
    5. android.hardware - Presents an API providing access to hardware such as the accelerometer and light sensor.
    6. android.os - Provides applications with access to standard operating system services including messages, system services and inter-process communication.
    7. android.media - Provides classes to enable playback of audio and video.
    8. android.net - A set of APIs providing access to the network stack. Includes android.net.wifi, which provides access to the device’s wireless stack.
    9. android.provider - A set of convenience classes that provide access to standard Android content provider databases such as those maintained by the calendar and contact applications.
    10. android.text - Used to render and manipulate text on a device display.
    11. android.util - A set of utility classes for performing tasks such as string and number conversion, XML handling and date and time manipulation.
    12. android.view – The fundamental building blocks of application user interfaces.
    13. android.widget - A rich collection of pre-built user interface components such as buttons, labels, list views, layout managers, radio buttons etc.
  • Native C/C++ Libraries -  Many Android components and services use native libraries which are written in C and C++, such as ART and HAL. In practice, developer will access these libraries solely through the Java based Android core library APIs. In the event that direct access to these libraries is needed, this can be achieved using the Android Native Development Kit (NDK), the purpose of which is to call the native methods of non-Java programming languages (such as C and C++) from within Java code using the Java Native Interface (JNI).
  • Java API Framework - This layer directly interacts with applications. In this layer, different components from stack can be accessed with the API written in Java. These APIs form the building blocks you need to create Android apps by simplifying the reuse of core, modular system components and service.
    1. Activity Manager – Controls all aspects of the application lifecycle and activity stack.
    2. Content Providers – Allows apps to access and share data with other apps.
    3. Resource Manager – Provides access to non-code embedded resources such as strings, color settings and user interface layouts.
    4. Notifications Manager – Allows apps to display alerts and notifications to the user.
    5. View System – An extensible set of views used to create user interfaces.
    6. Package Manager – The system by which applications are able to find out information about other applications currently installed on the device.
    7. Telephony Manager – Provides information to the application about the telephony services available on the device such as status and subscriber information.
    8. Location Manager – Provides access to the location services allowing an application to receive updates about location changes.
  • Applications - These comprise both the native applications provided with the particular Android implementation and the third party applications installed by the user after purchasing the device.


Figure 1 : Android Software Stack

Stay tuned for next article.



Comments

Post a Comment

Popular posts from this blog

Android Process States

Android App Overview