SlideShare una empresa de Scribd logo
1 de 22
Android
Android System Architecture

Source: Google
overview
• Linux Kernel: memory management, process
management, networking, and other
operating system services.
• Native Libraries: written in C or C++,
including: Surface Manager, 2D and 3D
graphics, Media codes, SQL database, Browser
engine, etc. only to be called by higher level
programs
overview
• Android Runtime: including the Dalvik virtual
machine and the core Java libraries. (not
J2SE/J2ME)
• Application Framework: Activity manager,
Content providers, Resource manager,
Notification manager
• Applications and Widgets: the real programs
display information and interact with users.
Media Framework
• Android use OpenCore as core component of
Media framework
• OpenCore supports MP3, AAC, AAC+, 3GPP,
MPEG-4 and JPEG,
Media Framework
Media Framework
• Example:
• MediaPlayer mp = new MediaPlayer();
• mp.setDataSource(PATH_TO_FILE);
• mp.prepare();
• mp.start();
Media Framework
• OpenCore lib has a C/S Architecture.
• MediaPlayer invoke JNI to manipulate client.
• The client request to the server to control
hardwares.
Media Framework
Media Framework
Activity Manager
• each user interface screen is represented by
an Activity class.
• Each activity has its own life cycle.
• Activity uses Intent object to jump between
them.
Life cycle of activity

Source: Hello
Adroid
Intent and Intent filters
• Intent activates activities, services, and
broadcast receivers.
• Intent can be used in explicit way or implicit
way.
• The implicit way depends on parameters:
Action, Data(url and MIME type) , Category
Intent and Intent filters
• To receive other components' request,
components’ need to register filters at
activities framework.
• When launch a intent object, framework will
match and find the qualified components and
leave them for users to choose which to run.
Intent and Intent filters
• Example
•

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
<action android:name="android.intent.action.PICK" />
<category
android:name="android.intent.category.DEFAULT" />
<data
android:mimeType="vnd.android.cursor.dir/vnd.google.note" />
</intent-filter>
Activities and Tasks
• A task is a stack which contain several
activities share the same affinity.

Source:
http://blog.akquinet.de/20
10/02/17/androidactivities-thepredominance-of-the-uithread/
Activities and Tasks
• There are four different launch modes that
can be assigned to an <activity> element's
launchMode attribute:
• "standard" (the default mode)
"singleTop"
"singleTask"
"singleInstance"
• First two share the same affinity with
application, the others don’t.
Content manager
• Manage data
• Client+server architecture.
• Content Resolver provides API interface for
applications.
• Content Providers is the server managing the
DB tables and database content with different
application.
Content manager
• URI identifies the data or the table

Source: Google

• A: Standard prefix indicating that the data is
controlled by a content provider.
• B: The authority part of the URI; it identifies the
content provider.
• C: The path that the content provider uses to
determine what kind of data is being requested.
• D: The ID of the specific record being requested.
Service Lifecycle
Security and permissions
• security between applications and the system
is enforced at the process level through
standard Linux facilities
• Application can't disrupt other applications,
except by explicitly declaring the permissions
it
• Each Android package is given its own unique
Linux user ID
References
• http://www.j2medev.com/android/ShowArtic
le.asp?ArticleID=5439
• http://docs.huihoo.com/google/io/2009/Mast
ering_the_Android_Media_Framework.pdf
• http://developer.android.com/

Más contenido relacionado

La actualidad más candente

Introduction to android basics
Introduction to android basicsIntroduction to android basics
Introduction to android basicsHasam Panezai
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to AndroidOum Saokosal
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsiaMichael Angelo Rivera
 
Lec004 setting up for development
Lec004   setting up for developmentLec004   setting up for development
Lec004 setting up for developmentEyad Almasri
 
Android Overview
Android OverviewAndroid Overview
Android OverviewRaju Kadam
 
Android Infrastructure
Android InfrastructureAndroid Infrastructure
Android InfrastructureEyad Almasri
 
Introduction to Android Development Part 1
Introduction to Android Development Part 1Introduction to Android Development Part 1
Introduction to Android Development Part 1Kainda Kiniel Daka
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentCan Elmas
 
An introduction to Android
An introduction to AndroidAn introduction to Android
An introduction to AndroidRajesh Jambukia
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_programEyad Almasri
 
Android architecture
Android architectureAndroid architecture
Android architecturepoojapainter
 
Android Programming Seminar
Android Programming SeminarAndroid Programming Seminar
Android Programming SeminarNhat Nguyen
 
Android operating system
Android operating systemAndroid operating system
Android operating systemDev Savalia
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopKasun Dananjaya Delgolla
 

La actualidad más candente (20)

Introduction to android basics
Introduction to android basicsIntroduction to android basics
Introduction to android basics
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsia
 
android
androidandroid
android
 
Lec004 setting up for development
Lec004   setting up for developmentLec004   setting up for development
Lec004 setting up for development
 
Android Overview
Android OverviewAndroid Overview
Android Overview
 
Android Programming
Android ProgrammingAndroid Programming
Android Programming
 
Google android os
Google android osGoogle android os
Google android os
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Android Infrastructure
Android InfrastructureAndroid Infrastructure
Android Infrastructure
 
Introduction to Android Development Part 1
Introduction to Android Development Part 1Introduction to Android Development Part 1
Introduction to Android Development Part 1
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
An introduction to Android
An introduction to AndroidAn introduction to Android
An introduction to Android
 
Lec001
Lec001Lec001
Lec001
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Android Programming Seminar
Android Programming SeminarAndroid Programming Seminar
Android Programming Seminar
 
Android operating system
Android operating systemAndroid operating system
Android operating system
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
 

Destacado

Android Training – Part 5
Android Training – Part 5Android Training – Part 5
Android Training – Part 5Tbldevelopment
 
P.E.T. Come Home App MRD
P.E.T. Come Home App MRDP.E.T. Come Home App MRD
P.E.T. Come Home App MRDTbldevelopment
 
Android Training - Part 3
Android Training - Part 3Android Training - Part 3
Android Training - Part 3Tbldevelopment
 
Android Training - Part 4
Android Training - Part 4Android Training - Part 4
Android Training - Part 4Tbldevelopment
 
P.E.T. Come Home App MRD
P.E.T. Come Home App MRDP.E.T. Come Home App MRD
P.E.T. Come Home App MRDTbldevelopment
 

Destacado (6)

Android Training – Part 5
Android Training – Part 5Android Training – Part 5
Android Training – Part 5
 
P.E.T. Come Home App MRD
P.E.T. Come Home App MRDP.E.T. Come Home App MRD
P.E.T. Come Home App MRD
 
Android Training - Part 3
Android Training - Part 3Android Training - Part 3
Android Training - Part 3
 
Mobile analytics 3.0
Mobile analytics 3.0Mobile analytics 3.0
Mobile analytics 3.0
 
Android Training - Part 4
Android Training - Part 4Android Training - Part 4
Android Training - Part 4
 
P.E.T. Come Home App MRD
P.E.T. Come Home App MRDP.E.T. Come Home App MRD
P.E.T. Come Home App MRD
 

Similar a Android Training - Part 2

Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionDuckMa
 
Android development
Android developmentAndroid development
Android developmentmkpartners
 
Android app development
Android app developmentAndroid app development
Android app developmentTechizzaa
 
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
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and SecurityKelwin Yang
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_authlzongren
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introductionaswapnal
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions newJoe Jacob
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidJawad Mohmand
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its FeaturesHarshad Lokhande
 
Android Application Development GDSC DCE Darbhanga.pptx
Android Application Development GDSC DCE Darbhanga.pptxAndroid Application Development GDSC DCE Darbhanga.pptx
Android Application Development GDSC DCE Darbhanga.pptxDCETechnicalClub
 
WeGroup--A Community Android App
WeGroup--A Community Android AppWeGroup--A Community Android App
WeGroup--A Community Android AppXuan Zhang
 
Overview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxOverview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxdebasish duarah
 
Android Application Development.pdf
Android Application Development.pdfAndroid Application Development.pdf
Android Application Development.pdfMohammedMuzammil99
 
Android application development
Android application developmentAndroid application development
Android application developmentDewan Razib
 

Similar a Android Training - Part 2 (20)

Synapseindia android middleware
Synapseindia android middlewareSynapseindia android middleware
Synapseindia android middleware
 
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.pptUnit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
 
Android development
Android developmentAndroid development
Android development
 
Android app development
Android app developmentAndroid app development
Android app development
 
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
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
My androidpresentation
My androidpresentationMy androidpresentation
My androidpresentation
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its Features
 
Android Application Development GDSC DCE Darbhanga.pptx
Android Application Development GDSC DCE Darbhanga.pptxAndroid Application Development GDSC DCE Darbhanga.pptx
Android Application Development GDSC DCE Darbhanga.pptx
 
WeGroup--A Community Android App
WeGroup--A Community Android AppWeGroup--A Community Android App
WeGroup--A Community Android App
 
Overview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxOverview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptx
 
Android Application Development.pdf
Android Application Development.pdfAndroid Application Development.pdf
Android Application Development.pdf
 
265.ppt
265.ppt265.ppt
265.ppt
 
Android application development
Android application developmentAndroid application development
Android application development
 

Último

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 AutomationSafe Software
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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 productivityPrincipled Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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 organizationRadu Cotescu
 
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 2024Rafal Los
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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...Neo4j
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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 DevelopmentsTrustArc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Último (20)

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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Android Training - Part 2

  • 3. overview • Linux Kernel: memory management, process management, networking, and other operating system services. • Native Libraries: written in C or C++, including: Surface Manager, 2D and 3D graphics, Media codes, SQL database, Browser engine, etc. only to be called by higher level programs
  • 4. overview • Android Runtime: including the Dalvik virtual machine and the core Java libraries. (not J2SE/J2ME) • Application Framework: Activity manager, Content providers, Resource manager, Notification manager • Applications and Widgets: the real programs display information and interact with users.
  • 5. Media Framework • Android use OpenCore as core component of Media framework • OpenCore supports MP3, AAC, AAC+, 3GPP, MPEG-4 and JPEG,
  • 7. Media Framework • Example: • MediaPlayer mp = new MediaPlayer(); • mp.setDataSource(PATH_TO_FILE); • mp.prepare(); • mp.start();
  • 8. Media Framework • OpenCore lib has a C/S Architecture. • MediaPlayer invoke JNI to manipulate client. • The client request to the server to control hardwares.
  • 11. Activity Manager • each user interface screen is represented by an Activity class. • Each activity has its own life cycle. • Activity uses Intent object to jump between them.
  • 12. Life cycle of activity Source: Hello Adroid
  • 13. Intent and Intent filters • Intent activates activities, services, and broadcast receivers. • Intent can be used in explicit way or implicit way. • The implicit way depends on parameters: Action, Data(url and MIME type) , Category
  • 14. Intent and Intent filters • To receive other components' request, components’ need to register filters at activities framework. • When launch a intent object, framework will match and find the qualified components and leave them for users to choose which to run.
  • 15. Intent and Intent filters • Example • <intent-filter> <action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.EDIT" /> <action android:name="android.intent.action.PICK" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.dir/vnd.google.note" /> </intent-filter>
  • 16. Activities and Tasks • A task is a stack which contain several activities share the same affinity. Source: http://blog.akquinet.de/20 10/02/17/androidactivities-thepredominance-of-the-uithread/
  • 17. Activities and Tasks • There are four different launch modes that can be assigned to an <activity> element's launchMode attribute: • "standard" (the default mode) "singleTop" "singleTask" "singleInstance" • First two share the same affinity with application, the others don’t.
  • 18. Content manager • Manage data • Client+server architecture. • Content Resolver provides API interface for applications. • Content Providers is the server managing the DB tables and database content with different application.
  • 19. Content manager • URI identifies the data or the table Source: Google • A: Standard prefix indicating that the data is controlled by a content provider. • B: The authority part of the URI; it identifies the content provider. • C: The path that the content provider uses to determine what kind of data is being requested. • D: The ID of the specific record being requested.
  • 21. Security and permissions • security between applications and the system is enforced at the process level through standard Linux facilities • Application can't disrupt other applications, except by explicitly declaring the permissions it • Each Android package is given its own unique Linux user ID