SlideShare a Scribd company logo
1 of 15
Android Introduction
Application Fundamentals
2
Goal
• Understand applications and their components
• Concepts:
– activity,
– service,
– broadcast receiver,
– content provider,
– intent,
– AndroidManifest
3
Applications
• Written in Java (it’s possible to write native code – will not cover that here)
• Good separation (and corresponding security) from other applications:
– Each application runs in its own process
– Each process has its own separate VM
– Each application is assigned a unique Linux user ID – by default files of that
application are only visible to that application (can be explicitly exported)
@2011 Mihail L. Sichtiu 4
Application Components
• Activities – visual user interface focused on a single thing a user can do
• Services – no visual interface – they run in the background
• Broadcast Receivers – receive and react to broadcast announcements
• Content Providers – allow data exchange between applications
@2011 Mihail L. Sichitiu 5
Activities
• Basic component of most applications
• Most applications have several activities that start each other as needed
• Each is implemented as a subclass of the base Activity class
@2011 Mihail L. Sichitiu 6
Activities – The View
• Each activity has a default window to draw in (although it may prompt for dialogs
or notifications)
• The content of the window is a view or a group of views (derived from View or
ViewGroup)
• Example of views: buttons, text fields, scroll bars, menu items, check boxes, etc.
• View(Group) made visible via Activity.setContentView() method.
@2011 Mihail L. Sichitiu 7
Services
• Does not have a visual interface
• Runs in the background indefinitely
• Examples
– Network Downloads
– Playing Music
– TCP/UDP Server
• You can bind to a an existing service and control its operation
@2011 Mihail L. Sichitiu 8
Broadcast Receivers
• Receive and react to broadcast announcements
• Extend the class BroadcastReceiver
• Examples of broadcasts:
– Low battery, power connected, shutdown, timezone changed, etc.
– Other applications can initiate broadcasts
@2011 Mihail L. Sichitiu 9
Content Providers
• Makes some of the application data available to other applications
• It’s the only way to transfer data between applications in Android (no shared files,
shared memory, pipes, etc.)
• Extends the class ContentProvider;
• Other applications use a ContentResolver object to access the data provided via a
ContentProvider
@2011 Mihail L. Sichitiu 10
Intents
• An intent is an Intent object with a message content.
• Activities, services and broadcast receivers are started by
intents. ContentProviders are started by ContentResolvers:
– An activity is started by Context.startActivity(Intent intent) or
Activity.startActivityForResult(Intent intent, int RequestCode)
– A service is started by Context.startService(Intent service)
– An application can initiate a broadcast by using an Intent in any of
Context.sendBroadcast(Intent intent),
Context.sendOrderedBroadcast(), and Context.sendStickyBroadcast()
@2011 Mihail L. Sichitiu 11
Shutting down components
• Activities
– Can terminate itself via finish();
– Can terminate other activities it started via finishActivity();
• Services
– Can terminate via stopSelf(); or Context.stopService();
• Content Providers
– Are only active when responding to ContentResolvers
• Broadcast Receivers
– Are only active when responding to broadcasts
@2011 Mihail L. Sichitiu 12
Android Manifest
• Its main purpose in life is to declare the components to the system:
<?xml version="1.0" encoding="utf-8"?>
<manifest . . . >
<application . . . >
<activity android:name="com.example.project.FreneticActivity"
android:icon="@drawable/small_pic.png"
android:label="@string/freneticLabel"
. . . >
</activity>
. . .
</application>
</manifest>
@2011 Mihail L. Sichitiu 13
Intent Filters
• Declare Intents handled by the current application (in the
AndroidManifest):
<?xml version="1.0" encoding="utf-8"?>
<manifest . . . >
<application . . . >
<activity android:name="com.example.project.FreneticActivity"
android:icon="@drawable/small_pic.png"
android:label="@string/freneticLabel"
. . . >
<intent-filter . . . >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter . . . >
<action android:name="com.example.project.BOUNCE" />
<data android:mimeType="image/jpeg" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
. . .
</application>
</manifest>
@2011 Mihail L. Sichitiu 14
Shows in the
Launcher and
is the main
activity to
start
Handles JPEG
images in
some way
Thank You !!!
For More Information click below link:
Follow Us on:
http://vibranttechnologies.co.in/android-classes-in-mumbai.html

More Related Content

Viewers also liked

UK Wetlands and Waterfowl decline WWT conservation efforts
UK Wetlands and Waterfowl decline WWT conservation effortsUK Wetlands and Waterfowl decline WWT conservation efforts
UK Wetlands and Waterfowl decline WWT conservation effortsNicola snow
 
Alex (delirium 2.0) lauren oliver
Alex    (delirium 2.0) lauren oliverAlex    (delirium 2.0) lauren oliver
Alex (delirium 2.0) lauren oliverEsme Sainz
 
Government in Canada
Government in CanadaGovernment in Canada
Government in CanadaKiciaCigail
 
Oakland Leaf Mission, Identity, Values, Vision
Oakland Leaf Mission, Identity, Values, VisionOakland Leaf Mission, Identity, Values, Vision
Oakland Leaf Mission, Identity, Values, Visionoaklandleaf
 
Jack Ryger: Brooklyn, New York
Jack Ryger: Brooklyn, New YorkJack Ryger: Brooklyn, New York
Jack Ryger: Brooklyn, New YorkJack D. Ryger
 
TOPIC 5 : ECOLOGY AND ENVIRONMENT
TOPIC 5 : ECOLOGY AND ENVIRONMENTTOPIC 5 : ECOLOGY AND ENVIRONMENT
TOPIC 5 : ECOLOGY AND ENVIRONMENTALIAH RUBAEE
 
THEORY of KNOWLEDGE
THEORY  of KNOWLEDGE THEORY  of KNOWLEDGE
THEORY of KNOWLEDGE ALIAH RUBAEE
 

Viewers also liked (8)

UK Wetlands and Waterfowl decline WWT conservation efforts
UK Wetlands and Waterfowl decline WWT conservation effortsUK Wetlands and Waterfowl decline WWT conservation efforts
UK Wetlands and Waterfowl decline WWT conservation efforts
 
Alex (delirium 2.0) lauren oliver
Alex    (delirium 2.0) lauren oliverAlex    (delirium 2.0) lauren oliver
Alex (delirium 2.0) lauren oliver
 
Government in Canada
Government in CanadaGovernment in Canada
Government in Canada
 
Oakland Leaf Mission, Identity, Values, Vision
Oakland Leaf Mission, Identity, Values, VisionOakland Leaf Mission, Identity, Values, Vision
Oakland Leaf Mission, Identity, Values, Vision
 
Задание 8
Задание 8Задание 8
Задание 8
 
Jack Ryger: Brooklyn, New York
Jack Ryger: Brooklyn, New YorkJack Ryger: Brooklyn, New York
Jack Ryger: Brooklyn, New York
 
TOPIC 5 : ECOLOGY AND ENVIRONMENT
TOPIC 5 : ECOLOGY AND ENVIRONMENTTOPIC 5 : ECOLOGY AND ENVIRONMENT
TOPIC 5 : ECOLOGY AND ENVIRONMENT
 
THEORY of KNOWLEDGE
THEORY  of KNOWLEDGE THEORY  of KNOWLEDGE
THEORY of KNOWLEDGE
 

Similar to Android App Components and Manifest

application Fundamentals Android Introduction
application Fundamentals  Android Introductionapplication Fundamentals  Android Introduction
application Fundamentals Android Introductionjeronimored
 
Basics of Android
Basics of Android Basics of Android
Basics of Android sabi_123
 
Eca online-seminar-session-1.pptx
Eca online-seminar-session-1.pptxEca online-seminar-session-1.pptx
Eca online-seminar-session-1.pptxGoran Djonovic
 
Project a day 2 android application fundamentals
Project a day 2   android application fundamentalsProject a day 2   android application fundamentals
Project a day 2 android application fundamentalsGoran Djonovic
 
Android architecture
Android architectureAndroid architecture
Android architectureDeepa Rahul
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & DatabasesMuhammad Sajid
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentOwain Lewis
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersBoom Shukla
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development TutorialGermán Bringas
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application DevelopmentAzfar Siddiqui
 
04 programmation mobile - android - (db, receivers, services...)
04 programmation mobile - android - (db, receivers, services...)04 programmation mobile - android - (db, receivers, services...)
04 programmation mobile - android - (db, receivers, services...)TECOS
 
Andriod Lecture 8 A.pptx
Andriod Lecture 8 A.pptxAndriod Lecture 8 A.pptx
Andriod Lecture 8 A.pptxfaiz324545
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidShumaila Khan
 
Basic of Android App Development
Basic of Android App DevelopmentBasic of Android App Development
Basic of Android App DevelopmentAbhijeet Gupta
 
Introduction to android basics
Introduction to android basicsIntroduction to android basics
Introduction to android basicsHasam Panezai
 
Beginning android
Beginning android Beginning android
Beginning android Igor R
 

Similar to Android App Components and Manifest (20)

application Fundamentals Android Introduction
application Fundamentals  Android Introductionapplication Fundamentals  Android Introduction
application Fundamentals Android Introduction
 
Basics of Android
Basics of Android Basics of Android
Basics of Android
 
Synapseindia android apps overview
Synapseindia android apps overviewSynapseindia android apps overview
Synapseindia android apps overview
 
Eca online-seminar-session-1.pptx
Eca online-seminar-session-1.pptxEca online-seminar-session-1.pptx
Eca online-seminar-session-1.pptx
 
Project a day 2 android application fundamentals
Project a day 2   android application fundamentalsProject a day 2   android application fundamentals
Project a day 2 android application fundamentals
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Basics 4
Basics   4Basics   4
Basics 4
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & Databases
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development Tutorial
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
04 programmation mobile - android - (db, receivers, services...)
04 programmation mobile - android - (db, receivers, services...)04 programmation mobile - android - (db, receivers, services...)
04 programmation mobile - android - (db, receivers, services...)
 
Andriod Lecture 8 A.pptx
Andriod Lecture 8 A.pptxAndriod Lecture 8 A.pptx
Andriod Lecture 8 A.pptx
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Basic of Android App Development
Basic of Android App DevelopmentBasic of Android App Development
Basic of Android App Development
 
Fun Food
Fun FoodFun Food
Fun Food
 
Introduction to android basics
Introduction to android basicsIntroduction to android basics
Introduction to android basics
 
Mobile web development
Mobile web developmentMobile web development
Mobile web development
 
Beginning android
Beginning android Beginning android
Beginning android
 

More from Vibrant Technologies & Computers

Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.Vibrant Technologies & Computers
 

More from Vibrant Technologies & Computers (20)

Buisness analyst business analysis overview ppt 5
Buisness analyst business analysis overview ppt 5Buisness analyst business analysis overview ppt 5
Buisness analyst business analysis overview ppt 5
 
SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables  SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables
 
SQL- Introduction to MySQL
SQL- Introduction to MySQLSQL- Introduction to MySQL
SQL- Introduction to MySQL
 
SQL- Introduction to SQL database
SQL- Introduction to SQL database SQL- Introduction to SQL database
SQL- Introduction to SQL database
 
ITIL - introduction to ITIL
ITIL - introduction to ITILITIL - introduction to ITIL
ITIL - introduction to ITIL
 
Salesforce - Introduction to Security & Access
Salesforce -  Introduction to Security & Access Salesforce -  Introduction to Security & Access
Salesforce - Introduction to Security & Access
 
Data ware housing- Introduction to olap .
Data ware housing- Introduction to  olap .Data ware housing- Introduction to  olap .
Data ware housing- Introduction to olap .
 
Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.
 
Data ware housing- Introduction to data ware housing
Data ware housing- Introduction to data ware housingData ware housing- Introduction to data ware housing
Data ware housing- Introduction to data ware housing
 
Salesforce - classification of cloud computing
Salesforce - classification of cloud computingSalesforce - classification of cloud computing
Salesforce - classification of cloud computing
 
Salesforce - cloud computing fundamental
Salesforce - cloud computing fundamentalSalesforce - cloud computing fundamental
Salesforce - cloud computing fundamental
 
SQL- Introduction to PL/SQL
SQL- Introduction to  PL/SQLSQL- Introduction to  PL/SQL
SQL- Introduction to PL/SQL
 
SQL- Introduction to advanced sql concepts
SQL- Introduction to  advanced sql conceptsSQL- Introduction to  advanced sql concepts
SQL- Introduction to advanced sql concepts
 
SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data   SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data
 
SQL- Introduction to SQL Set Operations
SQL- Introduction to SQL Set OperationsSQL- Introduction to SQL Set Operations
SQL- Introduction to SQL Set Operations
 
Sas - Introduction to designing the data mart
Sas - Introduction to designing the data martSas - Introduction to designing the data mart
Sas - Introduction to designing the data mart
 
Sas - Introduction to working under change management
Sas - Introduction to working under change managementSas - Introduction to working under change management
Sas - Introduction to working under change management
 
SAS - overview of SAS
SAS - overview of SASSAS - overview of SAS
SAS - overview of SAS
 
Teradata - Architecture of Teradata
Teradata - Architecture of TeradataTeradata - Architecture of Teradata
Teradata - Architecture of Teradata
 
Teradata - Restoring Data
Teradata - Restoring Data Teradata - Restoring Data
Teradata - Restoring Data
 

Recently uploaded

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
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 2024The Digital Insurer
 
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
 
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 Processorsdebabhi2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave 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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
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
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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...
 
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
 
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
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave 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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
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
 

Android App Components and Manifest

  • 1.
  • 3. Goal • Understand applications and their components • Concepts: – activity, – service, – broadcast receiver, – content provider, – intent, – AndroidManifest 3
  • 4. Applications • Written in Java (it’s possible to write native code – will not cover that here) • Good separation (and corresponding security) from other applications: – Each application runs in its own process – Each process has its own separate VM – Each application is assigned a unique Linux user ID – by default files of that application are only visible to that application (can be explicitly exported) @2011 Mihail L. Sichtiu 4
  • 5. Application Components • Activities – visual user interface focused on a single thing a user can do • Services – no visual interface – they run in the background • Broadcast Receivers – receive and react to broadcast announcements • Content Providers – allow data exchange between applications @2011 Mihail L. Sichitiu 5
  • 6. Activities • Basic component of most applications • Most applications have several activities that start each other as needed • Each is implemented as a subclass of the base Activity class @2011 Mihail L. Sichitiu 6
  • 7. Activities – The View • Each activity has a default window to draw in (although it may prompt for dialogs or notifications) • The content of the window is a view or a group of views (derived from View or ViewGroup) • Example of views: buttons, text fields, scroll bars, menu items, check boxes, etc. • View(Group) made visible via Activity.setContentView() method. @2011 Mihail L. Sichitiu 7
  • 8. Services • Does not have a visual interface • Runs in the background indefinitely • Examples – Network Downloads – Playing Music – TCP/UDP Server • You can bind to a an existing service and control its operation @2011 Mihail L. Sichitiu 8
  • 9. Broadcast Receivers • Receive and react to broadcast announcements • Extend the class BroadcastReceiver • Examples of broadcasts: – Low battery, power connected, shutdown, timezone changed, etc. – Other applications can initiate broadcasts @2011 Mihail L. Sichitiu 9
  • 10. Content Providers • Makes some of the application data available to other applications • It’s the only way to transfer data between applications in Android (no shared files, shared memory, pipes, etc.) • Extends the class ContentProvider; • Other applications use a ContentResolver object to access the data provided via a ContentProvider @2011 Mihail L. Sichitiu 10
  • 11. Intents • An intent is an Intent object with a message content. • Activities, services and broadcast receivers are started by intents. ContentProviders are started by ContentResolvers: – An activity is started by Context.startActivity(Intent intent) or Activity.startActivityForResult(Intent intent, int RequestCode) – A service is started by Context.startService(Intent service) – An application can initiate a broadcast by using an Intent in any of Context.sendBroadcast(Intent intent), Context.sendOrderedBroadcast(), and Context.sendStickyBroadcast() @2011 Mihail L. Sichitiu 11
  • 12. Shutting down components • Activities – Can terminate itself via finish(); – Can terminate other activities it started via finishActivity(); • Services – Can terminate via stopSelf(); or Context.stopService(); • Content Providers – Are only active when responding to ContentResolvers • Broadcast Receivers – Are only active when responding to broadcasts @2011 Mihail L. Sichitiu 12
  • 13. Android Manifest • Its main purpose in life is to declare the components to the system: <?xml version="1.0" encoding="utf-8"?> <manifest . . . > <application . . . > <activity android:name="com.example.project.FreneticActivity" android:icon="@drawable/small_pic.png" android:label="@string/freneticLabel" . . . > </activity> . . . </application> </manifest> @2011 Mihail L. Sichitiu 13
  • 14. Intent Filters • Declare Intents handled by the current application (in the AndroidManifest): <?xml version="1.0" encoding="utf-8"?> <manifest . . . > <application . . . > <activity android:name="com.example.project.FreneticActivity" android:icon="@drawable/small_pic.png" android:label="@string/freneticLabel" . . . > <intent-filter . . . > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter . . . > <action android:name="com.example.project.BOUNCE" /> <data android:mimeType="image/jpeg" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> . . . </application> </manifest> @2011 Mihail L. Sichitiu 14 Shows in the Launcher and is the main activity to start Handles JPEG images in some way
  • 15. Thank You !!! For More Information click below link: Follow Us on: http://vibranttechnologies.co.in/android-classes-in-mumbai.html