SlideShare a Scribd company logo
1 of 45
Download to read offline
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

Viewers also liked

The Middle Cretaceous Carbonate Ramp_Konidari
The Middle Cretaceous Carbonate Ramp_KonidariThe Middle Cretaceous Carbonate Ramp_Konidari
The Middle Cretaceous Carbonate Ramp_Konidari
Elissavet Konidari
 
Models Used by the Military Services to Develop Budgets for Activities Associ...
Models Used by the Military Services to Develop Budgets for Activities Associ...Models Used by the Military Services to Develop Budgets for Activities Associ...
Models Used by the Military Services to Develop Budgets for Activities Associ...
Congressional Budget Office
 
Modeling of Propellant Tank Pressurization
Modeling of Propellant Tank PressurizationModeling of Propellant Tank Pressurization
Modeling of Propellant Tank Pressurization
Amr Darwish
 
GUIDELINES FOR IMPORTING PRODUCT INTO NIGERIA
GUIDELINES FOR IMPORTING PRODUCT INTO NIGERIAGUIDELINES FOR IMPORTING PRODUCT INTO NIGERIA
GUIDELINES FOR IMPORTING PRODUCT INTO NIGERIA
Divine Greatman
 
Plan de délestage
Plan de délestagePlan de délestage
Plan de délestage
LeSoir.be
 
Introduction aux sciences economiques et à la gestion partie i
Introduction aux sciences economiques et à la gestion partie iIntroduction aux sciences economiques et à la gestion partie i
Introduction aux sciences economiques et à la gestion partie i
Aziz MOKHLES
 
Game On! Using Video Games to Ramp Up Your Instruction
Game On! Using Video Games to Ramp Up Your InstructionGame On! Using Video Games to Ramp Up Your Instruction
Game On! Using Video Games to Ramp Up Your Instruction
Jennifer LaGarde
 

Viewers also liked (20)

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

Similar to Introduction to Android Development

Android Jump Start
Android Jump StartAndroid Jump Start
Android Jump Start
ConFoo
 
Embedded Android Workshop at AnDevCon VI
Embedded Android Workshop at AnDevCon VIEmbedded Android Workshop at AnDevCon VI
Embedded Android Workshop at AnDevCon VI
Opersys inc.
 
Embedded Android Workshop at Embedded World 2014
Embedded Android Workshop at Embedded World 2014Embedded Android Workshop at Embedded World 2014
Embedded Android Workshop at Embedded World 2014
Opersys inc.
 

Similar to Introduction to Android Development (20)

Android Jump Start
Android Jump StartAndroid Jump Start
Android Jump Start
 
Embedded Android Workshop with Lollipop
Embedded Android Workshop with LollipopEmbedded Android Workshop with Lollipop
Embedded Android Workshop with Lollipop
 
Embedded Android Workshop with Lollipop
Embedded Android Workshop with LollipopEmbedded Android Workshop with Lollipop
Embedded Android Workshop with Lollipop
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with Marshmallow
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with Marshmallow
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with Marshmallow
 
Android Architecture, Environment, and Components.pptx
Android Architecture, Environment, and Components.pptxAndroid Architecture, Environment, and Components.pptx
Android Architecture, Environment, and Components.pptx
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with Marshmallow
 
Android Development...The 20,000-Foot View
Android Development...The 20,000-Foot ViewAndroid Development...The 20,000-Foot View
Android Development...The 20,000-Foot View
 
Native vs Hybrid Apps
Native vs Hybrid AppsNative vs Hybrid Apps
Native vs Hybrid Apps
 
Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012
 
Nightmapper's presentation
Nightmapper's presentationNightmapper's presentation
Nightmapper's presentation
 
Mobile Application Development and Types(1)
Mobile Application Development and Types(1)Mobile Application Development and Types(1)
Mobile Application Development and Types(1)
 
Embedded Android Workshop with Nougat
Embedded Android Workshop with NougatEmbedded Android Workshop with Nougat
Embedded Android Workshop with Nougat
 
android development training in mumbai
android development training in mumbaiandroid development training in mumbai
android development training in mumbai
 
Embedded Android Workshop at AnDevCon VI
Embedded Android Workshop at AnDevCon VIEmbedded Android Workshop at AnDevCon VI
Embedded Android Workshop at AnDevCon VI
 
Android Jam - Services & Notifications - Udacity Lesson 6
Android Jam - Services & Notifications - Udacity Lesson 6 Android Jam - Services & Notifications - Udacity Lesson 6
Android Jam - Services & Notifications - Udacity Lesson 6
 
Xamarin.android memory management gotchas
Xamarin.android memory management gotchasXamarin.android memory management gotchas
Xamarin.android memory management gotchas
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Embedded Android Workshop at Embedded World 2014
Embedded Android Workshop at Embedded World 2014Embedded Android Workshop at Embedded World 2014
Embedded Android Workshop at Embedded World 2014
 

More from Jumping Bean

IPv6 - Jozi Linux User Group Presentation
IPv6  - Jozi Linux User Group PresentationIPv6  - Jozi Linux User Group Presentation
IPv6 - Jozi Linux User Group Presentation
Jumping Bean
 

More from Jumping Bean (15)

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

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

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