SlideShare a Scribd company logo
Introduction to Android
Asfaw k.
1
Outline
• What is Android?
• Introduction (The Android Stack)
• Android Architecture
• Application Components
• Android Development Process
2
What is Android?
• Android is a software stack for mobile devices
that includes an operating system,
middleware(Software that act as a bridge
between an operating system or database) and
key applications.
• Android is a mobile operating system that is
based on a modified version of Linux.
3
• Android is a comprehensive open source
platform designed for mobile devices.
• Comprehensive platform: complete
stack for mobile devices.
• Open source: the entire stacks are free to
• Google’s mobile platform
Runs Smartphone ,tablet computers , (Samsung
Tablets , Similar to iPad)
Most popular
• Development platform
 Multiplatform
Based on Java
Plugins for Eclipse, Android Studio
4
cont.…
cont.…
• Android is an embedded OS(different kind of
machine or HW+SW)
• Android applications are written using
the Java framework, but Android is
not Java. Standard Java libraries such as
Swing are not supported.
• Android uses its own libraries.eg Time
Picker, global positioning.
• The Android OS is open source, which
means developers can view and use any
of the system source code
5
Android Features
• Storage: Uses SQLite, a lightweight relational database,
for data storage.
• Connectivity: Supports GSM/EDGE, IDEN, CDMA,
EV-DO, UMTS, Bluetooth (includes A2DP and AVRCP),
AVRCP), WiFi, LTE, and WiMAX.
• Messaging :Supports both SMS and MMS.
• Web browser: Based on the open-source WebKit,
together with Chrome’s V8 JavaScript engine
• Media support: includes support for the following
media: H.263, H.264 (in 3GP or MP4 container), MPEG-
MPEG-4 SP, AMR, AMR-WB (in 3GP container), AAC,
HE-AAC (in MP4 or 3GP container), MP3, MIDI, Ogg
Vorbis, WAV, JPEG, PNG, GIF, and BMP
6
cont.…
• Hardware support: Accelerometer
Sensor, Camera, Digital Compass,
Proximity Sensor, and GPS
• Multi-touch :Supports multi-touch
screens
• Multi-tasking: Supports multi-tasking
applications
• Flash support: Android 2.3 supports
Flash 10.1.
• Tethering: Supports sharing of Internet
connections as a wired/wireless hotspot
7
Android Stack
• Android operating system is like a cake
consisting of various layers. Each layer has its
own characteristics and purposes.
• Android is built on top of Linux.
• Way Linux?
– Its open source
– Portability-easy to integrate with different
hardware
– Security-Linux is highly secured system.
– Features-Linux provides:
• Hardware abstraction layer
• Memory management
• Process management
• Networking
8
…
• Software stack for mobile
devices
• Developed and managed
by open handset Alliances
• Open sourced under
Apache License
9
Android Architecture
Android Architecture – Linux Kernel
• Android relies on Linux Kernel 2.6 for core system services
» Process management
» Network stack
» Driver model
» Security
• The Kernel acts as an abstrac5on layer between the hardware
and the rest of the software stack
Android Architecture -‐ Runtime
• Core Libraries
– Provides most of the functionality
available in the core libraries of the
Java programming language
– APIs
• Data Structures
• Utli5es
• File Access
• Network Access
• Graphics
• Etc
12
Android Architecture -‐ Runtime…
• Dalvik VM
– Every android application
runs in its own process with
its own instances of the
dalvik vm
– Dalvik VM has been writte
n so that a device can run
multiple VMs
efficiently
– Register‐based virtual machi
ne
13
Android Architecture -‐ Runtime…
• Executes files in the Dalvik Executable (.dex) format, which
is optimized for minimal memory footprint
• Runs classes compiled by a Java language compiler
transformed into the .dex format
•
Relies on the Linux kernel for underlying functionality such as threa
ding and low-‐level memory management
14
Android Architecture -‐ Runtime…
• Includes a set of C/C++
libraries used by various
components of the Androi
d
system
• Exposed to developers
through the Android
applica5on framework
15
• Features
• System C Library (Bionic) a
version of libc : for technology and
license purpose
• Media Libraries supporting playbac
k and recording of popular audio/vi
deo formats
• Surface Manager (Surface Flinger)
• Audio Manager (Audio Flinger)
• LibWebCore (WebKit)
• SGL
• 3D Libraries: Open GL ES
• WebKit browser support
• SQLite
Android Architecture -Application Frame work
• Enabling and simplifying the reuse of com
ponents
– Developers have full access to the same frame
work APIs used by the core applications.
– Application architecture designed to simplify re
use of components
– Users are allowed to replace components.
16
Android Architecture -Application Frame work…
• Set of service and features
17
Android Architecture -Applications
• Android ships with a set of core applications:
– Email Client
– SMS Program
– Calendar
– Maps
– Browser
– Contacts
• All applications are written using the Java language
18
Most Popular Android Version September 2018
19
Old Version: Android 1.0, 1.1 to 1.5 (Cupcake), 1.6 (Donut), 2.0/2.1 (Eclair), 2.2
(Froyo), 2.3 (Gingerbread), to 3.0 (Honeycomb), 4.0 (Ice Cream Sandwich
Android Applications
• Android applications are written in Java
• The compiled Java code (along with any
data and resourcefiles required by the applicat
ion) is bundled into an Android package (.ap
k)
20
 Runs in its own
Linux process
 Each process has its own
virtual machine
 Each application assigned
a unique Linux user Id
What is APK?
• An application is a single application package (APK) file.
An APK file roughly has three main components. An API
consists of the following major components:
• Dalvik executable
– This is all your Java source code compiled down to a Dalvik
executable.
– This is the code that runs your application.
• Resources
– Resources are everything that is not code. Your application may
contain a number of images and audio/video clips, as well
as numerous XML files describing layouts, language
packs, and so on. Collectively, these items are the
resources.
• Native libraries
– Optionally, your application may include some native code, such as 21
Android and Java
• Android Java
=
Java SE
–
AWT/Swing
+
Android API
22
Still
We
can
have
it
the
old
Classic
Way
(Procedural
)
But
This
is
a
better
approach(
separating
content
from
display)
Android and Java
• Android java is an nonstandard collection of java. way?
• java have different Editions (Java Packaging)
– Java ME (Mobile Edition)
– java SE(Standard Edition )
– Java EE(Enterprise Edition)
• but android is not part of these editions
• So why Java ::: market issue because tons of java coders in
the world
23
Basic Application Components
24
Activity
• An activity is usually a single screen that the
user sees on the device at one time.
undertake:
– Extends the Activity base class
– Displays user interface controls (views)
– Provides for user interaction
25
Service
• service runs in the background for an indefinite
period of time.
– Example: play music, network download, etc.
– Does not have a user interface
– extends the Service base class.
• We can bind to a running service (or start the service if it's
not already running)
26
Broadcast Receivers
• Receives and reacts to broadcast announcements (Intents)
– Many broadcasts originate in system code.
– E.g. announcements that a picture is taken, that the time z
one has changed, that the battery is low, etc.
– Applications can also initiate ate broadcasts.
• E.g. to let other applications know that some data has
been downloaded to the device and is available for the
m to use
• Do not have a user interface
• May start an activity in response to the received
broadcast.
• May also use notifications to alert the user.
27
Content Providers
• Makes a specific set of the applications
data available to other applications.
– Data can be stored in the file system, in an
SQLite, or in any other manner that makes sense
– extends the ContentProvider base class to implement a
standard set of methods that enable other applica5ons
to retrieve and store
data of the type it controls
• Applications do not call these methods directly.
– They use a ContentResolver object and call its method
s instead
– ContentResolver can talk to any content provider
28
Installing and Configuring development Tools
• Android Studio: An easy to use Integrated
Development Environment (IDE) that brings
together Java and the Android SDK to make it
simple to write Android apps.
• Java JDK: The Java Development Kit. Lays
the foundation for the Android SDK.
• Android SDK: Included in Android Studio.
– Provides access to Android libraries and allows
you to develop for Android.
29
Installing Android Studio
• To download Android Studio,
• https://developer.android.com/studio
30
Adding SDK Packages
• 1. Choose Tools⇒Android⇒SDK Manager to launch the SDK
manager tool.
•
31
Setting Up an Emulator
• Like a real android device and allow you to test your application without having a
real device.
1. Choose Tools⇒Android⇒AVD Manager.
The AVD Manager dialog box opens.
32
33
34
Understanding Project Structure
35
• app: Where your main app code is placed.
• build.gradle: Your top level build file. It tells gradle, the
Android build system, how to build the various subdirectories
in your project.
app directory
36
• What the Android manifest file contains
– The name of your application ID for the
application, which is the unique identifier for your
application in the Android system as well as in the
Google Play Store
– The icon for your application
– The components of the application, such as the
activities and ​background services
– The declaration of the permissions your
application requires to run
37
Viewing the build.gradle file
38
 The compileSdkVersion tells Android Studio what version of the Android SDK you are
compiling against. This version is set based off the choices you made when you went
through the New Activity Wizard ​earlier in this chapter.
 The buildToolsVersion tells Android Studio what version of the build tools to use
(which is the version of the tools that you installed on your computer).
 The applicationId must match the package that you set in your AndroidManifest.xml
file.
Lab session
What you'll learn
• How to create a project in Android Studio.
• How to create an emulated Android device.
• How to run your app on the emulator.
• How to run your app on your own physical
device, if you have one.
39

More Related Content

Similar to Chapter 1 Introduction to android.ppt pl

Presentation for Android OS
Presentation for Android OSPresentation for Android OS
Presentation for Android OSMukul Cool
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osArnav Gupta
 
Android Architecture design programming with java
Android Architecture design programming with javaAndroid Architecture design programming with java
Android Architecture design programming with javassuser471dfb
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and SecurityKelwin Yang
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osArnav Gupta
 
Androidoverview 100405150711-phpapp01
Androidoverview 100405150711-phpapp01Androidoverview 100405150711-phpapp01
Androidoverview 100405150711-phpapp01Santosh Sh
 
Android - Application Framework
Android - Application FrameworkAndroid - Application Framework
Android - Application FrameworkYong Heui Cho
 
Introduction to Android (before 2015)
Introduction to Android (before 2015)Introduction to Android (before 2015)
Introduction to Android (before 2015)Chien-Ming Chou
 
Android Application Development Training by NITIN GUPTA
Android Application Development Training by NITIN GUPTA Android Application Development Training by NITIN GUPTA
Android Application Development Training by NITIN GUPTA NITIN GUPTA
 
Overview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxOverview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxdebasish duarah
 
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013DuckMa
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for BeginnersTripti Tiwari
 

Similar to Chapter 1 Introduction to android.ppt pl (20)

01 02 - introduction - adroid stack
01  02 - introduction - adroid stack01  02 - introduction - adroid stack
01 02 - introduction - adroid stack
 
Presentation for Android OS
Presentation for Android OSPresentation for Android OS
Presentation for Android OS
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
 
Android Architecture design programming with java
Android Architecture design programming with javaAndroid Architecture design programming with java
Android Architecture design programming with java
 
document
documentdocument
document
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
 
Androidoverview 100405150711-phpapp01
Androidoverview 100405150711-phpapp01Androidoverview 100405150711-phpapp01
Androidoverview 100405150711-phpapp01
 
Android Programming
Android ProgrammingAndroid Programming
Android Programming
 
Android
AndroidAndroid
Android
 
Android - Application Framework
Android - Application FrameworkAndroid - Application Framework
Android - Application Framework
 
Introduction to Android (before 2015)
Introduction to Android (before 2015)Introduction to Android (before 2015)
Introduction to Android (before 2015)
 
Android Application Development Training by NITIN GUPTA
Android Application Development Training by NITIN GUPTA Android Application Development Training by NITIN GUPTA
Android Application Development Training by NITIN GUPTA
 
Overview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxOverview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptx
 
android
androidandroid
android
 
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for Beginners
 
Android report.
Android report.Android report.
Android report.
 
Android Platform Architecture
Android Platform ArchitectureAndroid Platform Architecture
Android Platform Architecture
 

Recently uploaded

An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxCeline George
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPCeline George
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointELaRue0
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXMIRIAMSALINAS13
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17Celine George
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxCapitolTechU
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportAvinash Rai
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxJenilouCasareno
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryEugene Lysak
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxheathfieldcps1
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online PresentationGDSCYCCE
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesashishpaul799
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxbennyroshan06
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Celine George
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya - UEM Kolkata Quiz Club
 

Recently uploaded (20)

An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptx
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 

Chapter 1 Introduction to android.ppt pl

  • 2. Outline • What is Android? • Introduction (The Android Stack) • Android Architecture • Application Components • Android Development Process 2
  • 3. What is Android? • Android is a software stack for mobile devices that includes an operating system, middleware(Software that act as a bridge between an operating system or database) and key applications. • Android is a mobile operating system that is based on a modified version of Linux. 3
  • 4. • Android is a comprehensive open source platform designed for mobile devices. • Comprehensive platform: complete stack for mobile devices. • Open source: the entire stacks are free to • Google’s mobile platform Runs Smartphone ,tablet computers , (Samsung Tablets , Similar to iPad) Most popular • Development platform  Multiplatform Based on Java Plugins for Eclipse, Android Studio 4 cont.…
  • 5. cont.… • Android is an embedded OS(different kind of machine or HW+SW) • Android applications are written using the Java framework, but Android is not Java. Standard Java libraries such as Swing are not supported. • Android uses its own libraries.eg Time Picker, global positioning. • The Android OS is open source, which means developers can view and use any of the system source code 5
  • 6. Android Features • Storage: Uses SQLite, a lightweight relational database, for data storage. • Connectivity: Supports GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth (includes A2DP and AVRCP), AVRCP), WiFi, LTE, and WiMAX. • Messaging :Supports both SMS and MMS. • Web browser: Based on the open-source WebKit, together with Chrome’s V8 JavaScript engine • Media support: includes support for the following media: H.263, H.264 (in 3GP or MP4 container), MPEG- MPEG-4 SP, AMR, AMR-WB (in 3GP container), AAC, HE-AAC (in MP4 or 3GP container), MP3, MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, and BMP 6
  • 7. cont.… • Hardware support: Accelerometer Sensor, Camera, Digital Compass, Proximity Sensor, and GPS • Multi-touch :Supports multi-touch screens • Multi-tasking: Supports multi-tasking applications • Flash support: Android 2.3 supports Flash 10.1. • Tethering: Supports sharing of Internet connections as a wired/wireless hotspot 7
  • 8. Android Stack • Android operating system is like a cake consisting of various layers. Each layer has its own characteristics and purposes. • Android is built on top of Linux. • Way Linux? – Its open source – Portability-easy to integrate with different hardware – Security-Linux is highly secured system. – Features-Linux provides: • Hardware abstraction layer • Memory management • Process management • Networking 8
  • 9. … • Software stack for mobile devices • Developed and managed by open handset Alliances • Open sourced under Apache License 9
  • 11. Android Architecture – Linux Kernel • Android relies on Linux Kernel 2.6 for core system services » Process management » Network stack » Driver model » Security • The Kernel acts as an abstrac5on layer between the hardware and the rest of the software stack
  • 12. Android Architecture -‐ Runtime • Core Libraries – Provides most of the functionality available in the core libraries of the Java programming language – APIs • Data Structures • Utli5es • File Access • Network Access • Graphics • Etc 12
  • 13. Android Architecture -‐ Runtime… • Dalvik VM – Every android application runs in its own process with its own instances of the dalvik vm – Dalvik VM has been writte n so that a device can run multiple VMs efficiently – Register‐based virtual machi ne 13
  • 14. Android Architecture -‐ Runtime… • Executes files in the Dalvik Executable (.dex) format, which is optimized for minimal memory footprint • Runs classes compiled by a Java language compiler transformed into the .dex format • Relies on the Linux kernel for underlying functionality such as threa ding and low-‐level memory management 14
  • 15. Android Architecture -‐ Runtime… • Includes a set of C/C++ libraries used by various components of the Androi d system • Exposed to developers through the Android applica5on framework 15 • Features • System C Library (Bionic) a version of libc : for technology and license purpose • Media Libraries supporting playbac k and recording of popular audio/vi deo formats • Surface Manager (Surface Flinger) • Audio Manager (Audio Flinger) • LibWebCore (WebKit) • SGL • 3D Libraries: Open GL ES • WebKit browser support • SQLite
  • 16. Android Architecture -Application Frame work • Enabling and simplifying the reuse of com ponents – Developers have full access to the same frame work APIs used by the core applications. – Application architecture designed to simplify re use of components – Users are allowed to replace components. 16
  • 17. Android Architecture -Application Frame work… • Set of service and features 17
  • 18. Android Architecture -Applications • Android ships with a set of core applications: – Email Client – SMS Program – Calendar – Maps – Browser – Contacts • All applications are written using the Java language 18
  • 19. Most Popular Android Version September 2018 19 Old Version: Android 1.0, 1.1 to 1.5 (Cupcake), 1.6 (Donut), 2.0/2.1 (Eclair), 2.2 (Froyo), 2.3 (Gingerbread), to 3.0 (Honeycomb), 4.0 (Ice Cream Sandwich
  • 20. Android Applications • Android applications are written in Java • The compiled Java code (along with any data and resourcefiles required by the applicat ion) is bundled into an Android package (.ap k) 20  Runs in its own Linux process  Each process has its own virtual machine  Each application assigned a unique Linux user Id
  • 21. What is APK? • An application is a single application package (APK) file. An APK file roughly has three main components. An API consists of the following major components: • Dalvik executable – This is all your Java source code compiled down to a Dalvik executable. – This is the code that runs your application. • Resources – Resources are everything that is not code. Your application may contain a number of images and audio/video clips, as well as numerous XML files describing layouts, language packs, and so on. Collectively, these items are the resources. • Native libraries – Optionally, your application may include some native code, such as 21
  • 22. Android and Java • Android Java = Java SE – AWT/Swing + Android API 22 Still We can have it the old Classic Way (Procedural ) But This is a better approach( separating content from display)
  • 23. Android and Java • Android java is an nonstandard collection of java. way? • java have different Editions (Java Packaging) – Java ME (Mobile Edition) – java SE(Standard Edition ) – Java EE(Enterprise Edition) • but android is not part of these editions • So why Java ::: market issue because tons of java coders in the world 23
  • 25. Activity • An activity is usually a single screen that the user sees on the device at one time. undertake: – Extends the Activity base class – Displays user interface controls (views) – Provides for user interaction 25
  • 26. Service • service runs in the background for an indefinite period of time. – Example: play music, network download, etc. – Does not have a user interface – extends the Service base class. • We can bind to a running service (or start the service if it's not already running) 26
  • 27. Broadcast Receivers • Receives and reacts to broadcast announcements (Intents) – Many broadcasts originate in system code. – E.g. announcements that a picture is taken, that the time z one has changed, that the battery is low, etc. – Applications can also initiate ate broadcasts. • E.g. to let other applications know that some data has been downloaded to the device and is available for the m to use • Do not have a user interface • May start an activity in response to the received broadcast. • May also use notifications to alert the user. 27
  • 28. Content Providers • Makes a specific set of the applications data available to other applications. – Data can be stored in the file system, in an SQLite, or in any other manner that makes sense – extends the ContentProvider base class to implement a standard set of methods that enable other applica5ons to retrieve and store data of the type it controls • Applications do not call these methods directly. – They use a ContentResolver object and call its method s instead – ContentResolver can talk to any content provider 28
  • 29. Installing and Configuring development Tools • Android Studio: An easy to use Integrated Development Environment (IDE) that brings together Java and the Android SDK to make it simple to write Android apps. • Java JDK: The Java Development Kit. Lays the foundation for the Android SDK. • Android SDK: Included in Android Studio. – Provides access to Android libraries and allows you to develop for Android. 29
  • 30. Installing Android Studio • To download Android Studio, • https://developer.android.com/studio 30
  • 31. Adding SDK Packages • 1. Choose Tools⇒Android⇒SDK Manager to launch the SDK manager tool. • 31
  • 32. Setting Up an Emulator • Like a real android device and allow you to test your application without having a real device. 1. Choose Tools⇒Android⇒AVD Manager. The AVD Manager dialog box opens. 32
  • 33. 33
  • 34. 34
  • 35. Understanding Project Structure 35 • app: Where your main app code is placed. • build.gradle: Your top level build file. It tells gradle, the Android build system, how to build the various subdirectories in your project.
  • 37. • What the Android manifest file contains – The name of your application ID for the application, which is the unique identifier for your application in the Android system as well as in the Google Play Store – The icon for your application – The components of the application, such as the activities and ​background services – The declaration of the permissions your application requires to run 37
  • 38. Viewing the build.gradle file 38  The compileSdkVersion tells Android Studio what version of the Android SDK you are compiling against. This version is set based off the choices you made when you went through the New Activity Wizard ​earlier in this chapter.  The buildToolsVersion tells Android Studio what version of the build tools to use (which is the version of the tools that you installed on your computer).  The applicationId must match the package that you set in your AndroidManifest.xml file.
  • 39. Lab session What you'll learn • How to create a project in Android Studio. • How to create an emulated Android device. • How to run your app on the emulator. • How to run your app on your own physical device, if you have one. 39

Editor's Notes

  1. Libraries=A collection of similar things. C++=iostream.h=for input out conio… Jquery
  2. Libraries=A collection of similar things. C++=iostream.h=for input out conio… Jquery
  3. Libraries=A collection of similar things. C++=iostream.h=for input out conio… Jquery
  4. KaiOS: company Name…mobile os written with Cascading Style Sheets, JavaScript
  5. Talk About Why Swing is Left Out Talk about XML How we design a user Interface why not go from java source code to delvik(why byte code in between) Google reasion --> bc java was changing(java 5) in the developement of Delvik so they didnt want to base their work on unstable sruff so they choose Byte code instead