Android Tutorial

Android Tutorial Android Toast Button Widget In Android Tutorial Imageview Widget In Android Android Date Picker Example Android Time Picker Example Android Operating System Android Activity Android Architecture Android Content Providers Android Edittext Android Emulator Android Fragments Android Gridview Android Broadcast Receivers Event Handling In Android What Is Android Studio Android Navigation Drawer Android Recyclerview Android Scrollview Android Navigation Android Operating System Android ListView Android Studio Resources Android Studio's Layout Editor Android TextView Android Styles and Themes How To Show Image On An Android Application How To Insert An Email In Android Application In Android Version 8 How To Insert The Mobile Number On An Android Application Using Edittext Difference between android developer and web AdapterViewFlipper in Android with Example Android 9.0 Pie vs. Android 10, which one is better Android Development or Web Development which one is the best to choose Android Project Folder Structure Assets folder in Android How to reduce the size of APK in Android Top 7 Android App Development Books Top Programming Languages for Android Development Android Navigation Application Components Difference between android developer and web developer Event Handling in Android How to reduce the size of APK in Android Top 7 Android App Development Books Top Programming Languages for Android Development AdapterViewFlipper in Android with Example Android 9.0 “Pie” vs. Android 10, which one is better Android Development or Web Development which one is the best to choose Android EditText Android Fragments How to Update Gradle in Android Studio Navigation Drawer ScrollView What is Android Studio? Android Architecture Android Content Providers

Android Architecture

The Android architecture includes a different number of components to support the needs of Android devices. It contains an open-source Linux kernel with several C/C++ libraries exposed through the Android Software Application Framework service.

In all its components, the Linux kernel provides the main functionality of the smartphone operating system functionality, and the Dalvik Virtual Machine (DVM) provides a platform for running Android applications.

The major components of the Android architecture are:

  • Applications
  • Application Framework
  • Android Runtime
  • Platform Libraries
  • Linux Kernel

Illustrated representation of Android architecture with several major components and sub-components –

Android Architecture

Applications:

Applications are the highest layer of Android OS architecture. Pre-installed homes, contacts, cameras, galleries, and other third-party applications downloaded from the Play Store, such as applications and chat applications, games, etc., comes under this tier.

With the support of java or kotlin classes and servicesprovisioned by the application framework, Applications run within the Android runtime.

Application Framework:

The Application Framework provides some essential classes that are used to develop Android applications. It provides a general abstraction for accessing hardware and helps manage the user interface to application resources. In general, frameworks provide services that allow you to create a particular class, and application developers can use that class for creating applications.

Application Framework includes

  • Activity Manager is used to manage the entire activity lifecycle of the application.
  • Content Provider is used to manage sharing of important data between two applications.
  • Location Manager is used to manage the location of users obtained using the Global Positioning System.
  • Resource manager is used to manage the various types of resources used in Android applications.
  • Telephony Manager is used to manage all voice calls.

Android Runtime:

One of the most significantlayersof Android Architecture is Android Runtime Environment. It mainly includes components such as the Dalvik virtual machine (DVM) and various core platform libraries. Specifically, it provides the foundation for the application framework and powers our android appwith the support of the core platform libraries.

Like the Java Virtual Machine (JVM), the Dalvik Virtual Machine (DVM) is a register-based virtual machine,developed and optimized specifically for the Android operating system to enable devices to run multiple applicationsefficiently. Low-level memory management and threading dependupon theLinux kernellayer. Core libraries allow you to develop Android applications using either Kotlin or Java programming language.

Platform Libraries:

Libraries are present above the Linux Kernel layer. This includes various Java-based libraries and several C/C++ core libraries and such as SQLite, Media, Graphics, Surface Manager, and OpenGL to support Android development.

  • Media library provides different media codecs and supports playback and recording of audio and video files.
  • SurfaceManager, which manages access to the display subsystem.
  • Both SGL where SGL is “Scalable Graphics Library” is a 2D picture engineand OpenGLis a 3D image engine that uses cross-language, cross-platform application programming interfaces (APIs) for 2D and 3D graphics rendering.
  • Provides support for SQLite databases
  • Free-Type provides support for fonts.
  • Web-Kit is an open-source web browser engine that helps in displaying web content and provides all the required features to simplify page loading.
  • Secure Sockets Layer (SSL) is a security technique that is used for setting an encrypted connection between a web server and a web browser.

Linux Kernel:

The bottommostpart andcore of the Android OS architecture is Linux Kernel.The basic system working such as process management, memory management, and device management such as cameras, keypads, and displays is provided by Linux Kernel. It is responsible for governing all the available drivers such as, camera, Bluetooth, audio, display,memory drivers, etc. which are required when we run the application.

A layer of abstraction is provided between the device hardware and the rest of the components of the architecture by the Linux Kernel. The kernel also handles everything Linux is proud of, including networks and a huge number of device drivers. This can reduce the effort of peripheral hardware interfaces.

The features of the Linux kernel are:

  • Security: Linux Kernel assures the safety between the app and the system.
  • Memory management: It effectively supervises storage management, providing usthe freedom to develop our application.
  • Process Management: It provides good process scheduling which means it assigns resources to a process whenever the process needs them.
  • Network stacks: It assures network communication efficiency.
  • Driver model: It makes sure that the application runserror free, and it’s the duty of hardware makers for building their drivers in the Linux build.