• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Android Programming made easy
 

Android Programming made easy

on

  • 13,698 views

Overview of the Android Platform and its programming interface.

Overview of the Android Platform and its programming interface.

Statistics

Views

Total Views
13,698
Views on SlideShare
13,672
Embed Views
26

Actions

Likes
11
Downloads
0
Comments
0

6 Embeds 26

http://www.linux.rk.edu.pl 13
http://leaddog.com 8
http://johnlandry.leaddog.com 2
http://trunk.ly 1
http://pluqs.com 1
http://www.verious.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Android Programming made easy Android Programming made easy Presentation Transcript

    • Android Programming made easy
      I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone
      - BjarneStronstrup
    • About me – Lars Vogel
      (Twitter: @vogella)
      Independently active in the OpenSource Community, e.g. Eclipse and Android
      Working for SAP AG as Product Manager
      Maintains http://www.vogella.de Java, Eclipse and Android related Tutorials with ~15 000 visitors per
      Received the Eclipse Top Contributor Award 2010
    • The next 58 minutes
      Android overview
      Android Tool chain
      Demos
      Android Programming Constructs
      Q&A
    • What is Android?
      – operating system based on Linux
      – middleware
      – key applications
      – set of APIs
      Open Source
      Developed officially by the Open Handset Alliance lead by Google
    • 4 Software layers
    • Dalvik – town in iceland
      Android Programming
      You use the Java programming language but Android does not run Java Bytecode
      Tool dx converts Java Bytecode into Dalvik Executable Code (.dex)
    • Android Programming
      You use the Java programming language but Android does not run Java Bytecode
    • Calls
      Uses
    • Developer Toolchain
    • Android Development Tools (ADT) for Eclipse
      Not OpenSource 
      Eclipse based tooling
      • Provide the emulator
      • Wizard for creating new project
      • Additional Tooling
    • Emulator
      QEMU-based ARM emulator runs same image as a device
      Use same toolchain to work with device or emulatorInital startup is slooooowwwwww.....
    • Your first Android app in < 60 secs
      Timer check Application
    • Command lineadb – Android Debugging Bridgetelnet
    • Android programming
      constructs
    • Main Android programming constructs
      Activity
      Views
      Intents
      Broadcast Receiver
      Services
      ContentProvider
    • Activity – screen in the Android application
      Layout – Defines UI elements and their arrangements.
    • Life Cyle of an Activity
      void onCreate(Bundle savedInstanceState) void onStart() void onRestart() void onResume() void onPause() void onStop() void onDestroy()
      Android may destroy you!
    • Noteworthy:- ADT maintains the ID‘s automatically in R.java- Resources can be defined via xml
    • I had only the best intents....
    • Intents
      • Allow modular architecture
      • Two types
      • Explicit: Asking someone to do something
      • Implicit: Asking the system who can do something
      Intent
    • Services
      © Lars Vogel and others, Licensed under Creative Commons by-nc-nd-3.0 (de)
    • Services
      Android provides a multitude of system services
      • NotificationService
      • VibratorService
      • LocationService
      • AlarmService
      • ....
      Access via context.getSystemService(Context.CONST);
      You can define your own service.
    • Broadcast Receiver – Listen to system events
      Example:
      BATTERY_LOW, ACTION_BOOT_COMPLETED
      Defined statically in manifest or temporary via code
    • Timer check ApplicationLets alert!
    • Security
    • Android Application requires explicit permissions, e.g. for
      • DB access
      • Phone access
      • Contacts
      • Internet
      • System messages
    • Security is an inherent part of the system and not a layer the programmer needs to handle
    • There is more....
    • Android Connectivity
      I can talk and hear
      Internet (java.net, Apache HttpClient,...)
      Bluetooth
      Email
      SMS
      I have feelings
      Camera API
      Motion Detection
      Location API (GIS)
      Heat Sensor
      Accelerator
    • Storage
      File System (device or SD card)
      Preferences
      Database (SQLightDatabase)
    • Beyond Android – Google API‘s
    • Performance?
    • Performance Sins
      Avoid creating objects
      Static rules
      Avoid to use internal setters and getter (within the same class)
      Static final for constants
      Learn on giants (use the libraries)
      Details: http://developer.android.com/guide/practices/design/performance.html
    • 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
    • Summary
      Android powerful and well-designed development platform
      Power to the developer
    • Picture Credit
      All 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
    • Android: Where to go from here:
      Android Tutorial
      http://www.vogella.de/articles/Android/article.html
      Or Google for: ~1 rank
      “android development tutorial”
    • Thank you
      For further questions:
      Lars.Vogel@gmail.com
      http://www.vogella.de
      http://www.twitter.com/vogella
    • 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