Wednesday, October 28, 2020

Android Basic Concepts


ANDROID BASICS        


      
Android as a software stack— a set of software subsystems required to deliver a totally functional solution— for mobile devices.

   The stack includes an operating system (modified Linux kernel), middleware(software that connects the low-level operating system to high-level apps) that’s partly based on Java, and key apps (written in Java) such as a web browser (known as Browser) and a contact manager (known as Contacts).

Android offers the following features: 
  • Application framework enabling reuse and replacement of app components 
  • Bluetooth, EDGE, 3G, and WiFi support (hardware dependent) 
  • Camera, GPS, compass, sensors and accelerometer support (hardware dependent) 
  • Dalvik virtual machine optimized for mobile devices 
  • GSM Telephony support (hardware dependent) 
  • Integrated browser based on the open source WebKit engine 
  • Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) 
  • Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0, 1.1, or 2.0 specification (hardware acceleration optional) 
  • SQLite for structured data storage

ANDROID ARCHITECTURE

    The Android software stack consists of apps at the top, middleware (consisting of an application framework, libraries, and the Android runtime) in the middle, and a Linux kernel with various drivers at the bottom.          




Related : Android system architecture and build system overview

     Directly below the app layer is the application framework, a set of high-level building blocks for creating apps. The application framework is preinstalled on Android devices and consists of the following components:

  • Activity Manager: This component provides an app’s life cycle and maintains a shared activity stack for navigating within and among apps. 
  • Content Providers: These components encapsulate data (such as the Browser app’s bookmarks) that can be shared among apps.
  • Location Manager: This component makes it possible for an Android device to be aware of its physical location.
  • Notification Manager: This component lets an app notify the user of a significant event (such as a message’s arrival) without interrupting what the user is currently doing.
  • Package Manager: This component lets an app learn about other app packages that are currently installed on the device. 
  • Resource Manager: This component lets an app access its resources.
  • Telephony Manager: This component lets an app learn about a device’s telephony services. It also handles making and receiving phone calls.
  • View System: This component manages user interface elements and user interface-oriented event generation. 
  • Window Manager: This component organizes the screen’s real estate into windows, allocates drawing surfaces, and performs other window-related jobs.

Components

            An app consists of components (activities, services, broadcast receivers, and content providers) that run in a Linux process and that are managed by Android:             

  • Activities present user interface screens.
  • Services perform lengthy jobs (such as playing music) in the background and don’t provide user interfaces.
  • Broadcast receivers receive and react to broadcasts from Android or other components.
  • Content providers encapsulate data and make them available to apps.

Views, View Groups, and Event Listeners

        An activity’s user interface is based on views (user interface components), view groups(views that group together related views), and event listeners (objects that listen for events originating from views or view groups).                     

Fragments

      Android 3.0 introduced the concept of fragments, which are objects that represent parts of an activity’s user interface. A fragment serves as a modular section of an activity with its own life cycle and the ability to receive its own input events, and which you can add or remove while the activity is running. You can combine multiple fragments into a single activity to build a multipane user interface (typically in a tablet context) and reuse the fragment in multiple activities.          

Services

        A service is a component that runs in the background for an indefinite period of time and that doesn’t provide a user interface. As with an activity, a service runs on the process’s main thread; it should spawn another thread to perform a time-consuming operation. Services are classified as local or remote:           

  • A local service runs in the same process as the rest of the app. Such services make it easy to implement background tasks.
  • A remote service runs in a separate process. Such services let you perform interprocess communications.

Broadcast Receivers            

    A broadcast receiver is a component that receives and reacts to broadcasts. Many broadcasts originate in system code; for example, an announcement is made to indicate that the timezone has been changed or the battery power is low.

Content Providers

        A content provider is a component that makes a specific set of an app’s data available to other apps. The data can be stored in the Android filesystem, in an SQLite database, or in any other manner that makes sense.

Share:

0 comments:

Post a Comment

Popular Posts

Contact Form

Name

Email *

Message *