SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Android Architecture and its
framework
BSIT 7th
Android Architecture
Android operating system is a stack of software components which is roughly divided
into five sections and four main layers
Android architecture… Linux Kernel
The foundation of the Android platform is the Linux kernel.
For example, the Android Runtime (ART) relies on the Linux kernel for underlying
functionalities such as threading and low-level memory management.
Using a Linux kernel, allows Android to take advantage of key security features and
allows device manufacturers to develop hardware drivers for a well-known kernel.
Platform Architecture: Hardware Abstraction Layer
(HAL)
The hardware abstraction layer (HAL) provides standard interfaces that expose device hardware
capabilities to the higher-level Java API framework.
The hardware abstraction layer (HAL) provides standard interfaces that expose device hardware
capabilities to the 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.
Platform Architecture: Android Runtime
The hardware abstraction layer (HAL) provides standard interfaces that expose device hardware capabilities to the
higher-level Java API Framework.
For devices running Android version 5.0 (API level 21) or higher, each app runs in its own process and with its own
instance of the Android Runtime
ART is written to run multiple virtual machines on low-memory devices by executing DEX files, a bytecode format
designed specially for Android that's optimized for minimal memory footprint.
Prior to Android version 5.0 (API level 21), Dalvik was the Android runtime.
If your app runs well on ART, then it should work on Dalvik as well, but the reverse may not be true.
Android also includes a set of core runtime libraries that provide most of the functionality of Java programming
language.
Platform Architecture: Native C/ C++ Libraries
Many core Android system components and services, such as ART and HAL, are built from native code that require
native libraries written in C and C++.
The Android platform provides Java framework APIs to expose the functionality of some of these native libraries to
apps.
For example, you can access OpenGL ES through the Android framework’s Java OpenGL API to add support for
drawing and manipulating 2D and 3D graphics in your app
If you are developing an app that requires C or C++ code, you can use the Android NDK to access some of these
native platform libraries directly from your native code.
Platform Architecture: Java API Framework
The entire feature-set of the Android OS is available to you through APIs written in the Java language
These APIs form the building blocks you need to create Android apps by simplifying the reuse of core, modular system
components and services, which include the following:
1. A rich and extensible View System you can use to build an app’s UI, including lists, grids, text boxes, buttons, and even an
embeddable web browser
2. A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files
3. A Notification Manager that enables all apps to display custom alerts in the status bar
4. An Activity Manager that manages the lifecycle of apps and provides a common navigation back stack
5. . Content Providers that enable apps to access data from other apps, such as the Contacts app, or to share their own data
Platform Architecture: System Apps
Android comes with a set of core apps for email, SMS messaging, calendars, internet browsing, contacts, and more.
Apps included with the platform have no special status among the apps the user chooses to install.
So a third-party app can become the user's default web browser, SMS messenger, or even the default keyboard
(some exceptions apply, such as the system's Settings app).
The system apps function both as apps for users and to provide key capabilities that developers can access from their
own app.
For example, if your app would like to deliver an SMS message, you don't need to build that functionality yourself,
you can instead invoke whichever SMS app is already installed to deliver a message to the recipient you specify
Framework Definition
A framework in programming is a tool that
provides ready-made components or
solutions that are customized in order to
speed up development.
Android Frameworks
Today’s society lives a completely app-dependent life: our daily routines, working, or studying habits completely depend on
tons of different applications installed on our Android or iOS device.
We will discuss some of the most popular Android frameworks, the features they offer as well as the projects they’ll best fit
too.
Some of the frameworks we already have discussed in previous lecture:
JQuery Mobile
Worklight
Sencha Touch
JQT (Formerly Known As JQtouch)
Ionic Framework: Ionic is a free and open-source Android framework certified by MIT ( Massachusetts Institute of
Technology) and allows developers to build progressive hybrid apps with the help of HTML5, CSS3, and JavaScript.
Ionic has become one of the most famous frameworks for Android development due to its cross-platform
functionalities and the ability to integrate AngularJS.
This Android framework hosts a simple CLI (Command-line Interface) that facilitates features like emulators, live
reload, and logging.
Around 4 million Ionic-based apps were built, with more than 5 million developers in over 200 countries worldwide
using the framework. Moreover, it integrates with many services, including Google Play, Instagram, and other
platforms.
Android Application Development
To get into the Android Application Development, we need to understand the
following:
Android Activity Lifecycle
Basic Components of Android App
Activity Lifecycle
As a user navigates through, out of, and
back to your app, the Activity instances in
your app transition through different states
in their lifecycle.
The Activity class provides a number of
callbacks that allow the activity to know
that a state has changed: that the system is
creating, stopping, or resuming an activity,
or destroying the process in which the
activity resides.
To navigate transitions between stages of the
activity lifecycle, the Activity class provides a
core set of six callbacks:
onCreate() ,
onStart() ,
onResume() ,
onPause() ,
onStop() ,
onDestroy().
Doing the right work at the right time and handling transitions properly make your app more robust and
performant.
For example, good implementation of the lifecycle callbacks can help ensure that your app avoids:
Activity Lifecycle
Crashing if the user receives a phone call or switches to another app while using your app.
Consuming valuable system resources when the user is not actively using it.
Losing the user's progress if they leave your app and return to it at a later time.
Crashing or losing the user's progress when the screen rotates between landscape and portrait orientation.
The manifest file
Before the Android system can start an app component, the system must know that the component exists by reading the app's manifest file,
AndroidManifest.xml.
Your app must declare all its components in this file, which must be at the root of the app project directory.
The manifest file does a number of things in addition to declaring the app's components, such as the following:
Identifies any user permissions the app requires (GPS, Camera, etc.)
Declares the minimum API Level required by the app.
Declares Hardware or Software features used/ required (i.e. camera, bluetooth, etc.)
Declares API libraries the app needs to be linked against (other than the Android framework APIs), such as the Google Maps library.
Building Blocks of Android
Android apps are built as a combination of components that can be invoked individually.
For example, an activity is a type of app component that provides a user interface (UI).
The "main" activity starts when the user taps your app's icon.
App components are the essential building blocks of an Android app.
Each component is an entry point through which the system or a user can enter your app.
Some components depend on others.
There are four different types of app components:
Activities
Services
Broadcast receivers
Content providers
Building Blocks of Android: Activities
Activities are the basic entry point for
interacting with the user.
It represents a single screen (UI).
Although the activities work together to
form a cohesive user experience in the app,
each activity is independent of the others.
Building Blocks of Android: Services
Services are general-purpose entry point,
but runs in the background.
NO (UI) user interface .
User are mostly unaware about running of
services in background.
Live wallpapers, notifications, screen
savers, are all built as services.
Building Blocks of Android: Broadcast Receivers
Broadcast receivers allows you to register
for system or application events.
Don't display UI, they may create a status
bar notification to alert the user when a
broadcast event occurs.
Building Blocks of Android: Content Providers
Content providers manages app data that
you can store in the file system, in a SQLite
database, on firebase, on the web, or on
any other storage location that your app
can access.
Building Blocks of Android: Activating Components
Activities, Services, and Broadcast Receivers, are activated by an asynchronous message called an
INTENT.
Intents bind individual components to each other at runtime.
An intent is created with an Intent object, which defines a message to activate either a specific component
(explicit intent) or a specific type of component (implicit intent).
Content Providers are not activated by intents.
Rather, they are activated when targeted by a request from a ContentResolver

Weitere ähnliche Inhalte

Ähnlich wie architecture of android.pptx

Mobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfMobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdf
AbdullahMunir32
 

Ähnlich wie architecture of android.pptx (20)

01 what is android
01 what is android01 what is android
01 what is android
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for Beginners
 
Android overview
Android overviewAndroid overview
Android overview
 
Android
AndroidAndroid
Android
 
5 beginner android application development foundation
5 beginner android application development foundation5 beginner android application development foundation
5 beginner android application development foundation
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Android Basic
Android BasicAndroid Basic
Android Basic
 
Android
Android Android
Android
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
 
Android apps
Android appsAndroid apps
Android apps
 
Android primer
Android primerAndroid primer
Android primer
 
Android
AndroidAndroid
Android
 
Android cours
Android coursAndroid cours
Android cours
 
Know all about android development
Know all about android developmentKnow all about android development
Know all about android development
 
Nativa Android Applications development
Nativa Android Applications developmentNativa Android Applications development
Nativa Android Applications development
 
Mobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfMobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdf
 
Android article
Android articleAndroid article
Android article
 
Technology and Android.pptx
Technology and Android.pptxTechnology and Android.pptx
Technology and Android.pptx
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

architecture of android.pptx

  • 1. Android Architecture and its framework BSIT 7th
  • 2. Android Architecture Android operating system is a stack of software components which is roughly divided into five sections and four main layers
  • 3.
  • 4. Android architecture… Linux Kernel The foundation of the Android platform is the Linux kernel. For example, the Android Runtime (ART) relies on the Linux kernel for underlying functionalities such as threading and low-level memory management. Using a Linux kernel, allows Android to take advantage of key security features and allows device manufacturers to develop hardware drivers for a well-known kernel.
  • 5. Platform Architecture: Hardware Abstraction Layer (HAL) The hardware abstraction layer (HAL) provides standard interfaces that expose device hardware capabilities to the higher-level Java API framework. The hardware abstraction layer (HAL) provides standard interfaces that expose device hardware capabilities to the 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.
  • 6. Platform Architecture: Android Runtime The hardware abstraction layer (HAL) provides standard interfaces that expose device hardware capabilities to the higher-level Java API Framework. For devices running Android version 5.0 (API level 21) or higher, each app runs in its own process and with its own instance of the Android Runtime ART is written to run multiple virtual machines on low-memory devices by executing DEX files, a bytecode format designed specially for Android that's optimized for minimal memory footprint. Prior to Android version 5.0 (API level 21), Dalvik was the Android runtime. If your app runs well on ART, then it should work on Dalvik as well, but the reverse may not be true. Android also includes a set of core runtime libraries that provide most of the functionality of Java programming language.
  • 7. Platform Architecture: Native C/ C++ Libraries Many core Android system components and services, such as ART and HAL, are built from native code that require native libraries written in C and C++. The Android platform provides Java framework APIs to expose the functionality of some of these native libraries to apps. For example, you can access OpenGL ES through the Android framework’s Java OpenGL API to add support for drawing and manipulating 2D and 3D graphics in your app If you are developing an app that requires C or C++ code, you can use the Android NDK to access some of these native platform libraries directly from your native code.
  • 8. Platform Architecture: Java API Framework The entire feature-set of the Android OS is available to you through APIs written in the Java language These APIs form the building blocks you need to create Android apps by simplifying the reuse of core, modular system components and services, which include the following: 1. A rich and extensible View System you can use to build an app’s UI, including lists, grids, text boxes, buttons, and even an embeddable web browser 2. A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files 3. A Notification Manager that enables all apps to display custom alerts in the status bar 4. An Activity Manager that manages the lifecycle of apps and provides a common navigation back stack 5. . Content Providers that enable apps to access data from other apps, such as the Contacts app, or to share their own data
  • 9. Platform Architecture: System Apps Android comes with a set of core apps for email, SMS messaging, calendars, internet browsing, contacts, and more. Apps included with the platform have no special status among the apps the user chooses to install. So a third-party app can become the user's default web browser, SMS messenger, or even the default keyboard (some exceptions apply, such as the system's Settings app). The system apps function both as apps for users and to provide key capabilities that developers can access from their own app. For example, if your app would like to deliver an SMS message, you don't need to build that functionality yourself, you can instead invoke whichever SMS app is already installed to deliver a message to the recipient you specify
  • 10. Framework Definition A framework in programming is a tool that provides ready-made components or solutions that are customized in order to speed up development.
  • 11. Android Frameworks Today’s society lives a completely app-dependent life: our daily routines, working, or studying habits completely depend on tons of different applications installed on our Android or iOS device. We will discuss some of the most popular Android frameworks, the features they offer as well as the projects they’ll best fit too. Some of the frameworks we already have discussed in previous lecture: JQuery Mobile Worklight Sencha Touch JQT (Formerly Known As JQtouch)
  • 12. Ionic Framework: Ionic is a free and open-source Android framework certified by MIT ( Massachusetts Institute of Technology) and allows developers to build progressive hybrid apps with the help of HTML5, CSS3, and JavaScript. Ionic has become one of the most famous frameworks for Android development due to its cross-platform functionalities and the ability to integrate AngularJS. This Android framework hosts a simple CLI (Command-line Interface) that facilitates features like emulators, live reload, and logging. Around 4 million Ionic-based apps were built, with more than 5 million developers in over 200 countries worldwide using the framework. Moreover, it integrates with many services, including Google Play, Instagram, and other platforms.
  • 13. Android Application Development To get into the Android Application Development, we need to understand the following: Android Activity Lifecycle Basic Components of Android App
  • 14. Activity Lifecycle As a user navigates through, out of, and back to your app, the Activity instances in your app transition through different states in their lifecycle. The Activity class provides a number of callbacks that allow the activity to know that a state has changed: that the system is creating, stopping, or resuming an activity, or destroying the process in which the activity resides.
  • 15. To navigate transitions between stages of the activity lifecycle, the Activity class provides a core set of six callbacks: onCreate() , onStart() , onResume() , onPause() , onStop() , onDestroy().
  • 16. Doing the right work at the right time and handling transitions properly make your app more robust and performant. For example, good implementation of the lifecycle callbacks can help ensure that your app avoids: Activity Lifecycle Crashing if the user receives a phone call or switches to another app while using your app. Consuming valuable system resources when the user is not actively using it. Losing the user's progress if they leave your app and return to it at a later time. Crashing or losing the user's progress when the screen rotates between landscape and portrait orientation.
  • 17. The manifest file Before the Android system can start an app component, the system must know that the component exists by reading the app's manifest file, AndroidManifest.xml. Your app must declare all its components in this file, which must be at the root of the app project directory. The manifest file does a number of things in addition to declaring the app's components, such as the following: Identifies any user permissions the app requires (GPS, Camera, etc.) Declares the minimum API Level required by the app. Declares Hardware or Software features used/ required (i.e. camera, bluetooth, etc.) Declares API libraries the app needs to be linked against (other than the Android framework APIs), such as the Google Maps library.
  • 18. Building Blocks of Android Android apps are built as a combination of components that can be invoked individually. For example, an activity is a type of app component that provides a user interface (UI). The "main" activity starts when the user taps your app's icon. App components are the essential building blocks of an Android app. Each component is an entry point through which the system or a user can enter your app. Some components depend on others. There are four different types of app components: Activities Services Broadcast receivers Content providers
  • 19. Building Blocks of Android: Activities Activities are the basic entry point for interacting with the user. It represents a single screen (UI). Although the activities work together to form a cohesive user experience in the app, each activity is independent of the others.
  • 20. Building Blocks of Android: Services Services are general-purpose entry point, but runs in the background. NO (UI) user interface . User are mostly unaware about running of services in background. Live wallpapers, notifications, screen savers, are all built as services.
  • 21. Building Blocks of Android: Broadcast Receivers Broadcast receivers allows you to register for system or application events. Don't display UI, they may create a status bar notification to alert the user when a broadcast event occurs.
  • 22. Building Blocks of Android: Content Providers Content providers manages app data that you can store in the file system, in a SQLite database, on firebase, on the web, or on any other storage location that your app can access.
  • 23. Building Blocks of Android: Activating Components Activities, Services, and Broadcast Receivers, are activated by an asynchronous message called an INTENT. Intents bind individual components to each other at runtime. An intent is created with an Intent object, which defines a message to activate either a specific component (explicit intent) or a specific type of component (implicit intent). Content Providers are not activated by intents. Rather, they are activated when targeted by a request from a ContentResolver