Upload
tridens-doo
View
1.099
Download
4
Tags:
Embed Size (px)
Citation preview
Android
Presentation of mobile platform
Index
• Introduction to android
• Development enviroment
• Building blocks
• Performance
Introduction to android
• What is android ?
• Android – J2ME - iPhone
• Features
What is android ?
• Android literally means “Robot with human qualities”
• First open source mobile platform
• Software stack
– Operating system
– Middleware
– Key applications
– Rich set of APIs
Android linux kernel
• Android is not linux
• Based on linux 2.6, providing
– Security
– Memory managment
– Process managment
– Network stack
– Driver model
– Abstraction layer
Unique platform characteristics
• Open source
• Android market
• “all applications are equal” model
• Dalvik virtual mashine
Optimized for mobile
Arhitecture
Android - J2ME – iPhone
Foundation
Distribution
SDK cost
Performance
Android
Java
Market
Free
Average
J2ME
J2ME or Java FX
Free
Free
Average
iPhone
Objective C or Java
App store Hype
Free
Best
Features
• Localization
• Widgets
• Security
• Animations
• Multimedia
• Customization
• Compas
• OpenGL ES
Localization
• GoogleMaps
• StreetView
• Language localization
Google Maps
• External library
(com.google.android.maps)
• Maps API Key
• Routing in 2.1
StreetView
• 3D view
• Virtual look of city
Localization
• Default resources
• Done without programming
– res/values/strings.xml
– res/values-fr/strings.xml
• Depends on locale setting on phone
Widgets
• Home screen
• Most important or
timely information
• Provided standard
design
Security and permissions
• AndroidManifest.xml
– Control file
– “Glue” together Activitys
– Specifies permissions
Animations
• In/Out animations
• Alpha-transparency
• Rotate
• Scale
• Translate
• Combination of all 4
Audio and video
• Playback
– MediaPlayer
• Recording
– MediaRecorder
• JET content
Bluetooth
• Network stack for data exchange
• Scan other devices
• Establish RFCOMM channels
• Connect via service discovery
• Manage multiple connections
Style and themes
• Defined in resources
• Changing between themes
• Runtime change
Screen orientation
• Live change
• Landscape / portrait
Development enviroment
• Eclipse
• Plug-ins
• Emulator
Eclipse
Eclipse is an extensible development platform
• Extended with plug-ins
• Lightweight plug-ins
• Common used IDE
• Emulator
Plug-ins
• Android SDK
– Platforms
– Add-ons
– Tools
– API-documentation
• Android ADT
– ADT- Android Development Tools
– Accesing DDMS tool
Emulator
• Ability to
– Prototype
– Develop
– Test
• AVD configurations
• Debuging
Google applications
• Android browser
• Android dialer
Custom components
• Fundamental classes View and ViewGroup
• Button, TextView, EditText ...
• Own View subclass
• Attributes and parameters from XML
Building blocks
AndroidManifest.xml
Act
ivit
ies
Vie
ws
Inte
nts
Serv
ices
No
tifi
cati
on
s
Co
nte
ntP
rovi
der
s
Activities
• Stacked like a deck
of cards
• Only one is visible
• Ony one is active
• New activities are
placed at top
Activities lifecyle
Rectangles are callbacks where we can implement operationsperformed on state changes
Activities states
• Active
– At the top of the stack
• Paused
– Lost focus but still visible
– Can be killed
• Stopped
– Not at the top of the stack
• Dropped
– Killed to reclaim its memory
Views
• Basic class for UI components
• Respond to events
• Described in XML in layout resources
• Organized as trees to build up GUIs
Intent
• Used to move between Activities
• Describes what the application wants
• Provides late runtime binding
• Primary information
– Action ( ACTION_VIEW, ACTION_EDIT...)
– Data ( Data to operate on expressed as Uri)
Services
• Run in background
• Don’t interact with the user
• Run on the main thread of the process
• Run as long as
– Is started
– Has connections
Notifications
• Notify user about events
• Sent through NotificationManager
• Types
– Persistent icon
– Turning leds
– Sound or vibration
Content provider
• Objects that can – Retrieve data
– Store data
• Data is available to all applications
• Only way to share data between packages
• Usually the backend is SQLite
• Data exposed as a unique URI
Android key points
• Open source platform
• Android Apps Market
• Google Power Products
– Google voice
– Google maps
• Rapidly increasing market share
Primož Fideršek
Software engineer
www.tridens.si
37
Copyright (c) 2010 Tridens d.o.o. All rights reserved. Logotype is a registered trademark of Tridens d.o.o.
All other names/logos may be registered trademarks of their respective owners.