Date post: | 22-Nov-2014 |
Category: |
Education |
Upload: | benny-reimold |
View: | 1,278 times |
Download: | 1 times |
AndroidOverview – Structure – Development
Freitag, 15. Oktober 2010
English slidesStill hoping for an english attendend, though.
Freitag, 15. Oktober 2010
Benjamin Reimold• Angewandte Informatik @ DHBW
Stuttgart
• Mobile Development, (Android/WinMo/…)
• started with JEE, a lot of .Net recently
• also a music and book addict,...
• aformatik Training & Consulting
• Twitter: @elektrojunge
• Member of GTUG NAFreitag, 15. Oktober 2010
Moritz Haarmann
• BSc @ HdM Stuttgart, Medieninformatik
• Mobile-Development, iPhone & Android
• Too much Java EE
• Vollzeit-Nerd
• CaperWhite GmbH
• Twitter: @derwildemomo
• Founder of GTUG NA
Freitag, 15. Oktober 2010
Agenda
• Mobile operating systems - overview
• Android fundamentals
• The walkthrough
• Android market
• Other interesting stuff
Freitag, 15. Oktober 2010
Mobile Operating Systems
Overview & Comparison
Freitag, 15. Oktober 2010
Android OS
• Free, almost open source
• Based on a Linux kernel and a custom virtual machine (more later)
• Most smartphones bought in the US are Androids ( 8/2010 )
• Google, you know.
Freitag, 15. Oktober 2010
Apple iOS
• Most popular smartphone OS for consumers
• Growing importance for usage in enterprise („consumerized IT“)
• Closed, yet very powerful platform
• Based on Unix
• Requires: Objective-C skills, money & a mac
Freitag, 15. Oktober 2010
Blackberry OS
• Widely used in corporate environments
• High security standards & detailed administration (BES)
• Uses Java technology (Java ME + proprietary stuff)
• Closely linked with the online services offered
Freitag, 15. Oktober 2010
Windows Phone 7
• „In the wild“ – still matters
• Lost market share dramatically over the last years
• Windows Phone 7 to bring Microsoft back
• Windows Phone 7 ~ iOS 2
Freitag, 15. Oktober 2010
US Smartphone Market Shares - „in the wild“
28%
9%3%
19%
35%
4%2%
iPhone Android Linux WiMo RIM WebOSSymbian
Nielsen, Q1/2010http://blog.nielsen.com/nielsenwire/online_mobile/iphone-vs-android/
Share of Nokia Phones Worldwide Gartner 2010:34,2 % Nokia Handys including feature phones
In August, Android phones were the most sold mobile OS in the US
• overall smartphone penetration
• 23%
• lates numbers from Nielsen
• Android 19%
• Blackberry 31%
• iPhone 28%
Freitag, 15. Oktober 2010
Android FundamentalsOS Structure – Concepts
Freitag, 15. Oktober 2010
Architecture
Linux KernelHAL – Power Management – IPC – …
Librariesthink of Freetype, WebKit, SQLite
Android Runtime(Android libraries & Dalvik VM)
Application Frameworkbasically everything your application will interact with
Applications
Freitag, 15. Oktober 2010
Dalvik VM
• Runtime for applications (1 VM per application!)
• Heavily optimized for mobile devices
• Custom executable format (.dex)
• Based on Apache Harmony JVM implementation
• Not able to run Java Bytecode, no Java VM
Größte Optimierung statischer Art: globaler Constant Pool für alle Klassen eines Pakets.
Andere Opcodes (2 byte statt 1 byte)
Bei der Installation wird noch optimiert, z.B. bei Byte Order, Inline Functions, Static linking...
Freitag, 15. Oktober 2010
Tools• Eclipse
+ Android Developer Tools+ Android Debugging Bridge+ Emulator or Device
• everything but the device is 100% free
• Code Generator: droidBreeder, only rudimentary
• UI Tool: DroidDraw
• MDD approach with Xtext, Acceleo, EMF
Freitag, 15. Oktober 2010
- „Shortcomings?“-„We call it personality!“
• No SOAP libraries included
• No „properties“-file as in Java but similar mechanism using the „res“-folder
• No native device/sd card encryption
• Limitted device management api
Freitag, 15. Oktober 2010
Terms you should knowor have heard of
Freitag, 15. Oktober 2010
Activity
• Fundamental application building block
• „One screen“
• Lifecycle methods
• Create – resume – pause – destroy – …
• The „V“ and the „C“ in MVC
Freitag, 15. Oktober 2010
Intents
• „Abstract Description of an operation to be performed“
• Android specific event mechanism
• Late binding
• Can be created and received at runtime
• IPC
Freitag, 15. Oktober 2010
Application Context
• Runtime object provided by the system
• Look up services
• IPC
• Anything outside your app is likely to use the context at some point
Freitag, 15. Oktober 2010
Other terms & stuff
• Services – background activities without UI
• Content provider – shareable data stores
• Broadcast receiver – listeners for global intents
• Bundle - a bundle of „extra“ information
• The Manifest file – sounds familiar, doesn‘t it?
Freitag, 15. Oktober 2010
Development WalkthroughReady, Set..
Freitag, 15. Oktober 2010
Development Walkthrough• What does the app do?
• Create a project
• The DDMS perspective
• Project structure
• Create a virtual device
• With or without Google APIs?
• Layout the 1st activity
Freitag, 15. Oktober 2010
Development Walkthrough• Create the activity
• AndroidManifest.xml
• The Java fun begins!
• actually writing the first activity
• Persisting stuff with SQLite
• Accessing lists with Adapters
• HTTP-Calls
• Adding a MenuFreitag, 15. Oktober 2010
Things to keep in mind• Have a good user experience!
• Pay attention to the UI!
• Think about performance!
• Avoid object allocation (use static final attributes, avoid collections,...)!
• Consider different target devices!
• Pay more attention to the UI!
Freitag, 15. Oktober 2010
The Android Market• Register as a developer for $29 using Google
Checkout and agree to the license
• ~80.000 Apps (and growing)
• Not available worldwide but increased availability
• Significantly more free apps than paid ones (numbers vary, though)
• Needs a google account AND „google checkout“ for paid apps
• Alternative markets?
google checkout und paypal?
Freitag, 15. Oktober 2010
Other interesting stuff• Google Developer Events (not only on
Android) & Android Barcamps
• It‘s hard to get info directly from Google (improvements planned)
• User groups (www.gtugs.org) & Android Meet-ups
• Fragmentation Issues?!
• Patent problem (Oracle‘s lawsuit)?!
• Piracy problems?!Freitag, 15. Oktober 2010
Some advertiseing
There‘s the 1st event using „our new name“
Stuttgart GTUG2.11.2010, 18h, Android Tech Talks
Location: DHBW Stuttgart, Stuttgart-Mitte
Website: www.gtugna.gtugs.org
Freitag, 15. Oktober 2010
Thanks!
and now: Q&A!
Freitag, 15. Oktober 2010