SlideShare a Scribd company logo
Romain	
  Chiappinelli	
  
Application fundamentals
Application fundamentals
Activity
Service
Broadcastreceiver
Contentprovider
Apps are made from components
Android instantiates and runs them as
needed
Each component has its own purpose
and APIs
Primary class for user interaction
Usually implements a single, focused
task that the user can do
Application fundamentals
Application fundamentals
Runs in the background
to perform long-running operations
to support interaction with remote
processes
Application fundamentals
Application fundamentals
Application fundamentals
Component that listens for and responds to
events
The subscriber in publish/subscribe
pattern
Events represented by the Intent class
and then Broadcast
Component that listens for and responds to
events
The subscriber in publish/subscribe
pattern
Events represented by the Intent class
and then Broadcast
BroadcastReceiver receives and
responds to broadcast event
Application fundamentals
Application fundamentals
Application fundamentals
Store & share data across applications
Uses database-style interface
Handles interprocess communication
Application fundamentals
Application fundamentals
Application fundamentals
Application fundamentals
User enters an address
App displays a map of area around the
address
Application fundamentals
See:
http://developer.android.com/guide/!

 
 
 
developing/building
1.  Define resources
2.  Implement application classes
3.  Package application
4.  Install & run application
Resources are non-source code entities
Many different resource types, such as
Layout, Strings, Images, Menus, & animations
Allows apps to be customized for
different devices and users
See:
http://developer.android.com/guide/!

 
 
 
topics/resources
Types: String, String Array, Plurals
Types: String, String Array, Plurals
Typically stored in res/values/*.xml
Specified in XML, e.g.,
<string name="hello">Hello World!</string>
Can include formatting and styling
Accessed by other resources as:
@string/string_name
Accessed in Java as:
R.string.string_name
MapLocation
Application fundamentals
If your default language is Italian,
@string/location_string is
“Digita l’indirizzo”
Otherwise,
“Enter Location”
Application fundamentals
Application fundamentals
UI layout specified in XML files
Some tools allow visual layout
XML files typically stored in
res/layout/*.xml
Accessed in Java as:
R.layout. layout_name
Accessed by other resources as:
@layout/layout_name
Can specify different Layout files based
on your device’s orientation, screen size,
etc.
Application fundamentals
MapLocation
Application fundamentals
Application fundamentals
Application fundamentals
At compilation time, resources are used
to generate the R.java class
Java code uses the R class to access
resources
Application fundamentals
MapLocation
Usually involves at least one Activity
Activity initialization code usually in
onCreate()
Typical onCreate() workflow
Restore saved state
Set content view
Initialize UI elements
Link UI elements to code actions
Application fundamentals
MapLocation
MapLocation
System packages application components
& resources into a .apk file
Developers specify required application
information in a file called
AndroidManifest.xml
Information includes:
Application Name
Components
Other
Required permissions
Application features
Minimum API level
Application fundamentals
MapLocation
From Eclipse run in the emulator or
device
From command line
Enable USB Debugging on the device
Settings > Applications > Development > USB
debugging
% adb install <path_to_apk>
The Activity Class

More Related Content

PPTX
01 introduction to android
PPTX
03 android application structure
PPT
Introduction to android
PPTX
Beginning android
PDF
Android Bootcamp
PDF
Domo Arigato Mr. Roboto - Open Source Bridge 2009
PDF
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
PDF
Android Jump Start
01 introduction to android
03 android application structure
Introduction to android
Beginning android
Android Bootcamp
Domo Arigato Mr. Roboto - Open Source Bridge 2009
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Android Jump Start

Similar to Application fundamentals (20)

PPS
Getting Started With Android Application Development [IndicThreads Mobile Ap...
PPT
Android Training Ahmedabad , Android Course Ahmedabad, Android architecture
PPT
"Android" mobilių programėlių kūrimo įvadas #2
PDF
Lecture3
PPTX
Android development orientation for starters v2
ODP
Nativa Android Applications development
DOCX
Android Tutorial For Beginners Part-1
PPTX
Lec-3-Mobile Application Development.pptx
PDF
Android Development
PPT
LA_FUNDAMENTALS OF Android_Unit I ONE.ppt
PDF
PDF
Android development - the basics, MFF UK, 2012
PPT
Android - Android Application Configuration
PPT
Android application structure
PDF
Android Introduction
PPTX
Android apps development
PPTX
Workshop Android for Java Developers
PDF
Androidify workshop
PDF
Android Minnebar
PPTX
Android Development Basics
Getting Started With Android Application Development [IndicThreads Mobile Ap...
Android Training Ahmedabad , Android Course Ahmedabad, Android architecture
"Android" mobilių programėlių kūrimo įvadas #2
Lecture3
Android development orientation for starters v2
Nativa Android Applications development
Android Tutorial For Beginners Part-1
Lec-3-Mobile Application Development.pptx
Android Development
LA_FUNDAMENTALS OF Android_Unit I ONE.ppt
Android development - the basics, MFF UK, 2012
Android - Android Application Configuration
Android application structure
Android Introduction
Android apps development
Workshop Android for Java Developers
Androidify workshop
Android Minnebar
Android Development Basics
Ad

More from maamir farooq (20)

DOCX
Ooad lab1
PPT
Lesson 03
PPT
Lesson 02
PDF
Php client libray
PDF
Swiftmailer
PDF
PDF
PPTX
PDF
PDF
J query 1.7 cheat sheet
PDF
Assignment
PDF
Java script summary
PDF
PDF
PPTX
PPTX
Css summary
DOCX
Manual of image processing lab
PDF
Session management
PDF
Data management
PPTX
Content provider
Ooad lab1
Lesson 03
Lesson 02
Php client libray
Swiftmailer
J query 1.7 cheat sheet
Assignment
Java script summary
Css summary
Manual of image processing lab
Session management
Data management
Content provider
Ad

Recently uploaded (20)

PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Trump Administration's workforce development strategy
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Yogi Goddess Pres Conference Studio Updates
PPTX
master seminar digital applications in india
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Cell Structure & Organelles in detailed.
PDF
Complications of Minimal Access Surgery at WLH
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Orientation - ARALprogram of Deped to the Parents.pptx
Final Presentation General Medicine 03-08-2024.pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Trump Administration's workforce development strategy
01-Introduction-to-Information-Management.pdf
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Yogi Goddess Pres Conference Studio Updates
master seminar digital applications in india
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Chinmaya Tiranga quiz Grand Finale.pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Cell Structure & Organelles in detailed.
Complications of Minimal Access Surgery at WLH
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Anesthesia in Laparoscopic Surgery in India
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape

Application fundamentals