SlideShare a Scribd company logo
Presented by On Ramp
Android
Do Androids dream of electric sheep?
Understanding the Android platform
A developers perspective
1 May 2013 Presented by On Ramp
Presented by On Ramp
Objective
Provide a high level conceptual
model for understanding how to
build Android Applications
1 May 2013 Presented by On Ramp
Presented by On Ramp
About Me
â—Ź South African open source solutions integrator,
– Java developer,
– Drupal developer,
– Loves Linux,
â—Ź On Ramp
– Ethiopian Company
â—Ź Linux, Java, Android training and development house
â—Ź
Specialising in mobile telecoms space
1 May 2013 Presented by On Ramp
Presented by On Ramp
Agenda
â—Ź Android Architecture
â—Ź Supported Languages
â—Ź Dalvik VM
â—Ź Development Environments
● Components – Building Blocks
â—Ź High Level Overview
1 May 2013 Presented by On Ramp
Presented by On Ramp
Agenda
â—Ź Important concepts
– Intents
– Activities, Services, Content
Providers & Broadcast Receivers
– Resources
1 May 2013 Presented by On Ramp
Presented by On Ramp
What is
Android?
Android is a software stack for
mobile devices that includes an
operating system, middleware and
key applications
1 May 2013 Presented by On Ramp
Presented by On Ramp
Architecture
1 May 2013 Presented by On Ramp
Presented by On Ramp
Architecture
â—Ź Linux Layer
– Based on Linux,
– Source now part of mainline Linux
V3.3
– Linux security, process
management & networking
1 May 2013 Presented by On Ramp
Presented by On Ramp
Architecture
â—Ź Linux Layer
– Each app has its own Linux user,
– All files and resources owned by
app user,
– Other processes, app cannot
access other app's files/resources
1 May 2013 Presented by On Ramp
Presented by On Ramp
Architecture
â—Ź Core libraries written in C/C++
– Android runtime – Dalvik
– Services exposed via application
layer,
– Reuses open source components –
SQLite, FreeType etc
1 May 2013 Presented by On Ramp
Presented by On Ramp
Architecture
â—Ź Framework layer
– What your application interacts
with,
– API calls to framework services,
– Key concepts to grok Android API
1 May 2013 Presented by On Ramp
Presented by On Ramp
Architecture
YOU!
â—Ź Applicationwritten to use
services of the Android
platform
1 May 2013 Presented by On Ramp
Presented by On Ramp
Supported
Languages
â—Ź Android applications can be
written in
– Java
â—Ź Supports a subset of Java API,
â—Ź Can use most Java libraries,
– C/C++ using native
development kit
â—Ź Should only be when
performance is an issue.
1 May 2013 Presented by On Ramp
Presented by On Ramp
Supported
Languages
– C/C++ using native development kit
â—Ź Used to write components called from
Java
1 May 2013 Presented by On Ramp
Presented by On Ramp
Supported
Languages
â—Ź Second Class Citizens
– Scripting languages via Scripting
Layer for Android
– Javascript, Ruby, Python,LUA, Perl
– HTML 5 Apps
● Important – Phonegap etc
1 May 2013 Presented by On Ramp
Presented by On Ramp
Dalvik
â—Ź Dalvik is a process
virtual machine
– Application written in
Java
– Complied to Java byte
code (.class files)
– Converted into Dalvik
compatible files (.dex)
when packaged
1 May 2013 Presented by On Ramp
Presented by On Ramp
Dalvik
â—Ź Why Dalvik?
– More compact & memory efficient
than .class files
– Each application runs in its own
process,
– Each process gets it own VM
– Packaging (apk) files are zipped
.dex files
1 May 2013 Presented by On Ramp
Presented by On Ramp
Development
Environments
â—Ź Android SDK,
– Debugger
● (ADB – Andorid Debugger Bridge)
– Libraries
– Emulator
● Supported IDE – Eclipse
– ADT plugin
1 May 2013 Presented by On Ramp
Presented by On Ramp
Development
Environments
â—Ź Other IDE support
– NetBeans
– IntelliJ
– Command line/text editor
â—Ź Build tool
– Ant (official)
1 May 2013 Presented by On Ramp
Presented by On Ramp
Development
Environments
â—Ź Build tool
– Maven (support from
springsource)
â—Ź Android applications have
a directory structure
– Naming of directories is
important especially for
resources
1 May 2013 Presented by On Ramp
Presented by On Ramp
Core
Componentsâ—Ź Activities
– UI Layer
– Similar to UI controller for web apps
â—Ź Services
– Provides services to other applications, no ui, run in
background
â—Ź Content Providers
– Used to pass information between applications
â—Ź Broadcast receivers
– Listen to system events and broad cast and react
1 May 2013 Presented by On Ramp
Presented by On Ramp
Core
Components
â—Ź Notifications
– System notifications
1 May 2013 Presented by On Ramp
Presented by On Ramp
High Level
Overview
â—Ź Different from web or desktop
applications,
â—Ź Android in control of/manages
application,
– Constrained environment,
– Memory management,
– Power usage etc
1 May 2013 Presented by On Ramp
Presented by On Ramp
High Level
Overview
â—Ź Components interact with one
another indirectly.
â—Ź Android controls creation, life
cycle of components
1 May 2013 Presented by On Ramp
Presented by On Ramp
High Level
Understanding
â—Ź Applications can use components
from other apps,
â—Ź Task Stack -
– Android places UI components
(Activities), maybe from different
apps, onto a task stack, as user
navigates through an application
1 May 2013 Presented by On Ramp
Presented by On Ramp
High Level
Overview
â—Ź Component life cycle controlled by
platform,
â—Ź Platform provides life cycle methods to
allow components to react to changes in
life cycle
– onStart
– onResume
– onPause etc
1 May 2013 Presented by On Ramp
Presented by On Ramp
High Level
Overview
â—Ź Activity 2 & Activity 3 may be
from different applications
Task Stack
1 May 2013 Presented by On Ramp
Presented by On Ramp
High Level
Overview
â—Ź How does your activity request
new component from Android?
– API calls
– Via Intents
â—Ź Define what you would like to have
happen next,
â—Ź Pass data to next activity
â—Ź Receive data back
1 May 2013 Presented by On Ramp
Presented by On Ramp
Intents
â—Ź Intents
– can be specific -i.e require specific
class or
– Ask for any activity that provides
required service
â—Ź e.g view web page
1 May 2013 Presented by On Ramp
Presented by On Ramp
Intents
â—Ź Intent made up of
– Action: view web page,place call
– Category: what attribute the
component must have for your
action e.g must display home
screen
– Extra: data to pass between
components
1 May 2013 Presented by On Ramp
Presented by On Ramp
Components
Data Sharing
â—Ź How do components pass data
between each other?
– Bundles/Extra = can add data that
needs to be transferred with Intent
1 May 2013 Presented by On Ramp
Presented by On Ramp
Summary
UI
components
belong to a
task
Platform creates
components on
you behalf
API used to
request
component
creation
Components
have a life
cycle
Components
are building
blocks for
your app
Other apps
may use
your
components
1 May 2013 Presented by On Ramp
Presented by On Ramp
Android
Where to start?
Start coding Activity components
1 May 2013 Presented by On Ramp
Presented by On Ramp
Activities
â—Ź Main entry point for application,
â—Ź Configures user interface and
handles events,
â—Ź Each activity has one window in
which to draw,
1 May 2013 Presented by On Ramp
Presented by On Ramp
Activities
â—Ź UI layout is best done with xml
resource files,
â—Ź Java code for handling events &
setting up UI
â—Ź UI widgets extend View class
– Views are the display classes used
by an activity
1 May 2013 Presented by On Ramp
Presented by On Ramp
Activity UI
Layout
â—Ź
ADT plugin provides designer
â—Ź Similar to XHTM:
1 May 2013 Presented by On Ramp
Presented by On Ramp
Activity
Lifecycle
1 May 2013 Presented by On Ramp
Presented by On Ramp
Activities
Screen Flow
â—Ź Flow between activities or
screens is not direct,
â—Ź Application framework handles
this for you
â—Ź You ask framework to create
next screen you wish to display
1 May 2013 Presented by On Ramp
Presented by On Ramp
Activities
Screen Flow
â—Ź API Calls -
– startActivity(Intent)
– startActivityForResult(Intent)
1 May 2013 Presented by On Ramp
Presented by On Ramp
Resources
â—Ź Resources are static content
â—Ź Resources are managed by
generated code
â—Ź Layout definitions
â—Ź Images
â—Ź String constants
â—Ź Resource ids
1 May 2013 Presented by On Ramp
Presented by On Ramp
Resources
â—Ź Resources are defined in
â—Ź xml files,
â—Ź Images in folders
– Resources directory = res
– Naming of directories is important
1 May 2013 Presented by On Ramp
Presented by On Ramp
Application
Configuration
â—Ź Applications are groupings of
components
– Activities,
– Services
– Broadcast receivers
– Content provider
1 May 2013 Presented by On Ramp
Presented by On Ramp
Application
Configuration
â—Ź Apps are defined via manifest.xml
– <application> defines
â—Ź launcher activity for app,
â—Ź what intents your components are created to
handle
– <uses-permission> to identify what services
your application requires access to
1 May 2013 Presented by On Ramp
Presented by On Ramp
Security
â—Ź Linux layer
– process level security,
– File level security
â—Ź Application layer
– Request permission from user to
access services
– manifest.xml <use-permission>
1 May 2013 Presented by On Ramp
Presented by On Ramp
Contact Info
â—Ź On Ramp Web Site
– http://www.onramp.mobi
â—Ź Social Networks -
– Twitter @mxc4
– G+ MClarke4
â—Ź Email:
– support@onramp.mobi
– mark@onramp.mobi

More Related Content

PDF
Mvp presentation
PPT
R&D Today: Addressing and Enhancing Research & Development's Effectiveness - ...
PPTX
Sanofi Aventis
PPTX
Ramp Metering [Naeem Rezghi]
PPTX
RAMP Presentation - ALNAP 2013
PPTX
Simplifying Social Network Diagrams
PPT
Kilbane 2009 R&amp;D Summary
PPTX
Southwest airlines takes off with better supply chain management
Mvp presentation
R&D Today: Addressing and Enhancing Research & Development's Effectiveness - ...
Sanofi Aventis
Ramp Metering [Naeem Rezghi]
RAMP Presentation - ALNAP 2013
Simplifying Social Network Diagrams
Kilbane 2009 R&amp;D Summary
Southwest airlines takes off with better supply chain management

Viewers also liked (20)

PPT
The Middle Cretaceous Carbonate Ramp_Konidari
PPTX
Digital Futures Knowledge Networks Bbc R&amp;D At Mmu Create Group Launch
 
PDF
Mode&Digital #fashionwebfluence
PPTX
Summer training (civil engineering)-Ramp construction
PDF
Models Used by the Military Services to Develop Budgets for Activities Associ...
PDF
Entreprises B2B ou industrielles organisez votre presence en ligne
PPTX
Work Experience @ Kemblefield.(Thomas Heath)
 
PPTX
Modeling of Propellant Tank Pressurization
DOCX
GUIDELINES FOR IMPORTING PRODUCT INTO NIGERIA
PDF
Plan de délestage
PDF
Beta codex - Organiser pour la complexité
PDF
Introduction aux sciences economiques et Ă  la gestion partie i
PPTX
Pressure measurement id Mitesh Kuamr
PPT
Du développement durable à la Responsabilité sociétale
PPTX
Waster water treatment
PDF
L'information superieure pour 2012 sur des secrets raisonnables de cheminee d...
PPT
Ramp Techno SOlutions
PPT
Waste Water Treatment
PPTX
sap nw bw7.3 on sap hana ramp up project approach (2)
PPT
Game On! Using Video Games to Ramp Up Your Instruction
The Middle Cretaceous Carbonate Ramp_Konidari
Digital Futures Knowledge Networks Bbc R&amp;D At Mmu Create Group Launch
 
Mode&Digital #fashionwebfluence
Summer training (civil engineering)-Ramp construction
Models Used by the Military Services to Develop Budgets for Activities Associ...
Entreprises B2B ou industrielles organisez votre presence en ligne
Work Experience @ Kemblefield.(Thomas Heath)
 
Modeling of Propellant Tank Pressurization
GUIDELINES FOR IMPORTING PRODUCT INTO NIGERIA
Plan de délestage
Beta codex - Organiser pour la complexité
Introduction aux sciences economiques et Ă  la gestion partie i
Pressure measurement id Mitesh Kuamr
Du développement durable à la Responsabilité sociétale
Waster water treatment
L'information superieure pour 2012 sur des secrets raisonnables de cheminee d...
Ramp Techno SOlutions
Waste Water Treatment
sap nw bw7.3 on sap hana ramp up project approach (2)
Game On! Using Video Games to Ramp Up Your Instruction
Ad

Similar to Introduction to Android Development (20)

PPTX
Technology and Android.pptx
PDF
Android Workshop_1
PPTX
Introduction to Android (before 2015)
ODP
Nativa Android Applications development
PPTX
Android basic principles
PPT
Android For Java Developers
PDF
Android internals
PPTX
Android- Introduction for Beginners
PPT
Android overview
PDF
Androidoscon20080721 1216843094441821-9
PDF
Androidoscon20080721 1216843094441821-9
PPTX
Android Technology
PDF
Android : How Do I Code Thee?
PPTX
Introduction to Android Development Part 1
PDF
Lecture3
ODP
Hello Android - Pune GTUG
PPT
PPT Companion to Android
PPTX
Android quick talk
PPT
LA_FUNDAMENTALS OF Android_Unit I ONE.ppt
PPTX
Android apps development
Technology and Android.pptx
Android Workshop_1
Introduction to Android (before 2015)
Nativa Android Applications development
Android basic principles
Android For Java Developers
Android internals
Android- Introduction for Beginners
Android overview
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
Android Technology
Android : How Do I Code Thee?
Introduction to Android Development Part 1
Lecture3
Hello Android - Pune GTUG
PPT Companion to Android
Android quick talk
LA_FUNDAMENTALS OF Android_Unit I ONE.ppt
Android apps development
Ad

More from Jumping Bean (15)

PDF
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
PDF
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data type
PDF
React - The JavaScript Library for User Interfaces
PDF
IPv6 How To Set Up a Linux IPv6 Lan
PDF
HTML 5 & The Modern Web
PDF
Building games-with-libgdx
PDF
Linux Containers & Docker
PDF
Introduction to Web Sockets
PDF
Secrets of a linux ninja Software Freedom Day 2013 Johannesburg, South Africa
PDF
M-Learning application development with open source
PDF
Introduction to AngularJS
PDF
Glassfish An Introduction
PDF
Java logging
PDF
IPv6 - Jozi Linux User Group Presentation
PDF
SELinux Johannesburg Linux User Group (JoziJUg)
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data type
React - The JavaScript Library for User Interfaces
IPv6 How To Set Up a Linux IPv6 Lan
HTML 5 & The Modern Web
Building games-with-libgdx
Linux Containers & Docker
Introduction to Web Sockets
Secrets of a linux ninja Software Freedom Day 2013 Johannesburg, South Africa
M-Learning application development with open source
Introduction to AngularJS
Glassfish An Introduction
Java logging
IPv6 - Jozi Linux User Group Presentation
SELinux Johannesburg Linux User Group (JoziJUg)

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Big Data Technologies - Introduction.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Unlocking AI with Model Context Protocol (MCP)
DOCX
The AUB Centre for AI in Media Proposal.docx
 
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
 
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
Teaching material agriculture food technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
 
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Per capita expenditure prediction using model stacking based on satellite ima...
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation_ Review paper, used for researhc scholars
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Big Data Technologies - Introduction.pptx
sap open course for s4hana steps from ECC to s4
Unlocking AI with Model Context Protocol (MCP)
The AUB Centre for AI in Media Proposal.docx
 
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
The Rise and Fall of 3GPP – Time for a Sabbatical?
 
Network Security Unit 5.pdf for BCA BBA.
Teaching material agriculture food technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
 
Chapter 3 Spatial Domain Image Processing.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

Introduction to Android Development

  • 1. Presented by On Ramp Android Do Androids dream of electric sheep? Understanding the Android platform A developers perspective
  • 2. 1 May 2013 Presented by On Ramp Presented by On Ramp Objective Provide a high level conceptual model for understanding how to build Android Applications
  • 3. 1 May 2013 Presented by On Ramp Presented by On Ramp About Me â—Ź South African open source solutions integrator, – Java developer, – Drupal developer, – Loves Linux, â—Ź On Ramp – Ethiopian Company â—Ź Linux, Java, Android training and development house â—Ź Specialising in mobile telecoms space
  • 4. 1 May 2013 Presented by On Ramp Presented by On Ramp Agenda â—Ź Android Architecture â—Ź Supported Languages â—Ź Dalvik VM â—Ź Development Environments â—Ź Components – Building Blocks â—Ź High Level Overview
  • 5. 1 May 2013 Presented by On Ramp Presented by On Ramp Agenda â—Ź Important concepts – Intents – Activities, Services, Content Providers & Broadcast Receivers – Resources
  • 6. 1 May 2013 Presented by On Ramp Presented by On Ramp What is Android? Android is a software stack for mobile devices that includes an operating system, middleware and key applications
  • 7. 1 May 2013 Presented by On Ramp Presented by On Ramp Architecture
  • 8. 1 May 2013 Presented by On Ramp Presented by On Ramp Architecture â—Ź Linux Layer – Based on Linux, – Source now part of mainline Linux V3.3 – Linux security, process management & networking
  • 9. 1 May 2013 Presented by On Ramp Presented by On Ramp Architecture â—Ź Linux Layer – Each app has its own Linux user, – All files and resources owned by app user, – Other processes, app cannot access other app's files/resources
  • 10. 1 May 2013 Presented by On Ramp Presented by On Ramp Architecture â—Ź Core libraries written in C/C++ – Android runtime – Dalvik – Services exposed via application layer, – Reuses open source components – SQLite, FreeType etc
  • 11. 1 May 2013 Presented by On Ramp Presented by On Ramp Architecture â—Ź Framework layer – What your application interacts with, – API calls to framework services, – Key concepts to grok Android API
  • 12. 1 May 2013 Presented by On Ramp Presented by On Ramp Architecture YOU! â—Ź Applicationwritten to use services of the Android platform
  • 13. 1 May 2013 Presented by On Ramp Presented by On Ramp Supported Languages â—Ź Android applications can be written in – Java â—Ź Supports a subset of Java API, â—Ź Can use most Java libraries, – C/C++ using native development kit â—Ź Should only be when performance is an issue.
  • 14. 1 May 2013 Presented by On Ramp Presented by On Ramp Supported Languages – C/C++ using native development kit â—Ź Used to write components called from Java
  • 15. 1 May 2013 Presented by On Ramp Presented by On Ramp Supported Languages â—Ź Second Class Citizens – Scripting languages via Scripting Layer for Android – Javascript, Ruby, Python,LUA, Perl – HTML 5 Apps â—Ź Important – Phonegap etc
  • 16. 1 May 2013 Presented by On Ramp Presented by On Ramp Dalvik â—Ź Dalvik is a process virtual machine – Application written in Java – Complied to Java byte code (.class files) – Converted into Dalvik compatible files (.dex) when packaged
  • 17. 1 May 2013 Presented by On Ramp Presented by On Ramp Dalvik â—Ź Why Dalvik? – More compact & memory efficient than .class files – Each application runs in its own process, – Each process gets it own VM – Packaging (apk) files are zipped .dex files
  • 18. 1 May 2013 Presented by On Ramp Presented by On Ramp Development Environments â—Ź Android SDK, – Debugger â—Ź (ADB – Andorid Debugger Bridge) – Libraries – Emulator â—Ź Supported IDE – Eclipse – ADT plugin
  • 19. 1 May 2013 Presented by On Ramp Presented by On Ramp Development Environments â—Ź Other IDE support – NetBeans – IntelliJ – Command line/text editor â—Ź Build tool – Ant (official)
  • 20. 1 May 2013 Presented by On Ramp Presented by On Ramp Development Environments â—Ź Build tool – Maven (support from springsource) â—Ź Android applications have a directory structure – Naming of directories is important especially for resources
  • 21. 1 May 2013 Presented by On Ramp Presented by On Ramp Core Componentsâ—Ź Activities – UI Layer – Similar to UI controller for web apps â—Ź Services – Provides services to other applications, no ui, run in background â—Ź Content Providers – Used to pass information between applications â—Ź Broadcast receivers – Listen to system events and broad cast and react
  • 22. 1 May 2013 Presented by On Ramp Presented by On Ramp Core Components â—Ź Notifications – System notifications
  • 23. 1 May 2013 Presented by On Ramp Presented by On Ramp High Level Overview â—Ź Different from web or desktop applications, â—Ź Android in control of/manages application, – Constrained environment, – Memory management, – Power usage etc
  • 24. 1 May 2013 Presented by On Ramp Presented by On Ramp High Level Overview â—Ź Components interact with one another indirectly. â—Ź Android controls creation, life cycle of components
  • 25. 1 May 2013 Presented by On Ramp Presented by On Ramp High Level Understanding â—Ź Applications can use components from other apps, â—Ź Task Stack - – Android places UI components (Activities), maybe from different apps, onto a task stack, as user navigates through an application
  • 26. 1 May 2013 Presented by On Ramp Presented by On Ramp High Level Overview â—Ź Component life cycle controlled by platform, â—Ź Platform provides life cycle methods to allow components to react to changes in life cycle – onStart – onResume – onPause etc
  • 27. 1 May 2013 Presented by On Ramp Presented by On Ramp High Level Overview â—Ź Activity 2 & Activity 3 may be from different applications Task Stack
  • 28. 1 May 2013 Presented by On Ramp Presented by On Ramp High Level Overview â—Ź How does your activity request new component from Android? – API calls – Via Intents â—Ź Define what you would like to have happen next, â—Ź Pass data to next activity â—Ź Receive data back
  • 29. 1 May 2013 Presented by On Ramp Presented by On Ramp Intents â—Ź Intents – can be specific -i.e require specific class or – Ask for any activity that provides required service â—Ź e.g view web page
  • 30. 1 May 2013 Presented by On Ramp Presented by On Ramp Intents â—Ź Intent made up of – Action: view web page,place call – Category: what attribute the component must have for your action e.g must display home screen – Extra: data to pass between components
  • 31. 1 May 2013 Presented by On Ramp Presented by On Ramp Components Data Sharing â—Ź How do components pass data between each other? – Bundles/Extra = can add data that needs to be transferred with Intent
  • 32. 1 May 2013 Presented by On Ramp Presented by On Ramp Summary UI components belong to a task Platform creates components on you behalf API used to request component creation Components have a life cycle Components are building blocks for your app Other apps may use your components
  • 33. 1 May 2013 Presented by On Ramp Presented by On Ramp Android Where to start? Start coding Activity components
  • 34. 1 May 2013 Presented by On Ramp Presented by On Ramp Activities â—Ź Main entry point for application, â—Ź Configures user interface and handles events, â—Ź Each activity has one window in which to draw,
  • 35. 1 May 2013 Presented by On Ramp Presented by On Ramp Activities â—Ź UI layout is best done with xml resource files, â—Ź Java code for handling events & setting up UI â—Ź UI widgets extend View class – Views are the display classes used by an activity
  • 36. 1 May 2013 Presented by On Ramp Presented by On Ramp Activity UI Layout â—Ź ADT plugin provides designer â—Ź Similar to XHTM:
  • 37. 1 May 2013 Presented by On Ramp Presented by On Ramp Activity Lifecycle
  • 38. 1 May 2013 Presented by On Ramp Presented by On Ramp Activities Screen Flow â—Ź Flow between activities or screens is not direct, â—Ź Application framework handles this for you â—Ź You ask framework to create next screen you wish to display
  • 39. 1 May 2013 Presented by On Ramp Presented by On Ramp Activities Screen Flow â—Ź API Calls - – startActivity(Intent) – startActivityForResult(Intent)
  • 40. 1 May 2013 Presented by On Ramp Presented by On Ramp Resources â—Ź Resources are static content â—Ź Resources are managed by generated code â—Ź Layout definitions â—Ź Images â—Ź String constants â—Ź Resource ids
  • 41. 1 May 2013 Presented by On Ramp Presented by On Ramp Resources â—Ź Resources are defined in â—Ź xml files, â—Ź Images in folders – Resources directory = res – Naming of directories is important
  • 42. 1 May 2013 Presented by On Ramp Presented by On Ramp Application Configuration â—Ź Applications are groupings of components – Activities, – Services – Broadcast receivers – Content provider
  • 43. 1 May 2013 Presented by On Ramp Presented by On Ramp Application Configuration â—Ź Apps are defined via manifest.xml – <application> defines â—Ź launcher activity for app, â—Ź what intents your components are created to handle – <uses-permission> to identify what services your application requires access to
  • 44. 1 May 2013 Presented by On Ramp Presented by On Ramp Security â—Ź Linux layer – process level security, – File level security â—Ź Application layer – Request permission from user to access services – manifest.xml <use-permission>
  • 45. 1 May 2013 Presented by On Ramp Presented by On Ramp Contact Info â—Ź On Ramp Web Site – http://www.onramp.mobi â—Ź Social Networks - – Twitter @mxc4 – G+ MClarke4 â—Ź Email: – support@onramp.mobi – mark@onramp.mobi