30
Android Introduction Lars Vogel Twitter: @vogella Google+: http://gplus.to/vogella

Android Overview (Karlsruhe VKSI)

Embed Size (px)

DESCRIPTION

Android Overview.

Citation preview

Page 1: Android Overview (Karlsruhe VKSI)

Android Introduction

Lars VogelTwitter: @vogellaGoogle+: http://gplus.to/vogella

Page 2: Android Overview (Karlsruhe VKSI)

- Software stack based on Linux with a Java programming interface.

- Open Source

- Developed officially by the Open Handset Alliance lead by Google

What is Android?

Page 3: Android Overview (Karlsruhe VKSI)
Page 4: Android Overview (Karlsruhe VKSI)

More then 550 000 new phone activations per day

(from 14 Juli 2011)

Android is market-leader in the Smartphone segment

Page 5: Android Overview (Karlsruhe VKSI)

On Android you develop in Java

Really?

Page 6: Android Overview (Karlsruhe VKSI)

You use the Java programming language but Android does not run Java Bytecode

Android Programming

Application runs on the Dalvik virtual machine

Tool dx converts Java Bytecode into Dalvik Executable Code (.dex)

Page 7: Android Overview (Karlsruhe VKSI)

Rich UI components

Threads and Background Processing

Full network stack (Http, JSON)

Database and File System access

Access to the hardware (GPS, Camera, Phone)

and much more............

Overview of the API Capabilities

Page 8: Android Overview (Karlsruhe VKSI)

Developer Toolchain

Page 9: Android Overview (Karlsruhe VKSI)

Android Development Tools (ADT) for Eclipse

Eclipse based tooling

WindowsLinux (i386)Mac OS (Intel)

Page 10: Android Overview (Karlsruhe VKSI)

QEMU-based ARM emulator runs same image as a device

Use same toolchain to work with device or emulator

Inital startup is slooooowwwwww.....

Emulator

Page 11: Android Overview (Karlsruhe VKSI)

Android programming constructs

Page 12: Android Overview (Karlsruhe VKSI)

Main Android programming constructs

Activity

Broadcast Receiver

Intents

Services

ContentProvider

Views

Page 13: Android Overview (Karlsruhe VKSI)

An activity is a single, focused thing that the user can do.

Extends “android.app.Activity”

Layout of Activity defines UI elements and their arrangements

Activity

Page 14: Android Overview (Karlsruhe VKSI)

I had only the best intents....

Page 15: Android Overview (Karlsruhe VKSI)

In Android there is no such thing as a monolistic application, everything is a connection of components.

Page 16: Android Overview (Karlsruhe VKSI)

Intents

• new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.vogella.de"));

• new Intent(Intent.ACTION_CALL, Uri.parse("tel:(+49)12345789"));

• New Intent(this, MyClass.class);

Page 17: Android Overview (Karlsruhe VKSI)

Deployment

Also known as: I really hope that Steve likes my app....

Page 18: Android Overview (Karlsruhe VKSI)

Deployment

• USB Cable• Market (Google, Amazon)• Direct

Page 19: Android Overview (Karlsruhe VKSI)

There is more....

Page 20: Android Overview (Karlsruhe VKSI)

Internet (java.net, Apache HttpClient, JSON...)BluetoothEmailSMSVoIP (SIP (Session Initiation Protocol))

I can talk and hear

Page 21: Android Overview (Karlsruhe VKSI)

Camera APIMotion DetectionLocation API (GIS)Heat SensorAccelerator

I have feelings

Page 22: Android Overview (Karlsruhe VKSI)

Other Capabilities

Good security system

Push to device

Storage: File System / Preferences SQLiteDatabase

Interactive Widgets on the homescreen

Live Wallpapers (as background)

Animations and Styling

Simple List handling

(Multi-) Touch

NFS

Canvas / OpenGL ES (Game programming....)

Page 23: Android Overview (Karlsruhe VKSI)

Performance?

Page 24: Android Overview (Karlsruhe VKSI)

Be fast!

Avoid ApplicationNotResponding Error

Threads not allowed to modify the UI directly

Use handler or AsyncTask to update the UI after Thread is done

Page 25: Android Overview (Karlsruhe VKSI)

Summary

Android powerful and well-designed development

platform

Marketleader for Smartphones

Power to the developer

Page 26: Android Overview (Karlsruhe VKSI)

Android: Where to go from here:

Google for „Android Development Tutorials“

Android Training: http://www.vogella.de/training/android.html

Page 27: Android Overview (Karlsruhe VKSI)
Page 28: Android Overview (Karlsruhe VKSI)

Thank you

For further questions:

[email protected]://www.vogella.deTwitter http://www.twitter.com/vogellaGoogle+ http://gplus.to/vogella

Page 29: Android Overview (Karlsruhe VKSI)

Picture CreditAll pictures are from http://www.sxc.hu/ to get them add the number to http://www.sxc.hu/photo/

• Agenda 1089869• Dalvik 1269657• Software Layer / Tomatos 832159• 616474• Thinking guy 324541• Smiling Boy 812138• Toolchain 1197009• Stopwatch http://www.sxc.hu/photo/634598• Timer / Watches 1062014• Next guy 986700• Sad Lady 232738• Funny guy 1173019• Waiter / Services

http://www.sxc.hu/photo/157966• Security 695054• There is more 702367

• Performance rabbits 786444• Performance snail 1181451• Performance Running man 377100• Hang-man 620961• Summary http://www.sxc.hu/photo/1184807• Question http://www.sxc.hu/photo/418215• Reading material

http://www.sxc.hu/photo/406547• Thank you http://www.sxc.hu/photo/986313

Page 30: Android Overview (Karlsruhe VKSI)

License & Acknowledgements

• This work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License

– See http://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.en_US