SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Kürzlich hochgeladen (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

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