1 / 25

Android for Java Developers

Android for Java Developers. Denver Java Users Group Jan 11, 2012 -Mike Wolfson @mikewolfson. Why Android?. Open APIs – everyone’s equal Low Barrier to entry Run app on your own device - $0 Sell through Google Market - $25 Easy to develop apps Especially for Java Developers

koen
Download Presentation

Android for Java Developers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Android for Java Developers Denver Java Users Group Jan 11, 2012 -Mike Wolfson @mikewolfson

  2. Why Android? • Open APIs – everyone’s equal • Low Barrier to entry • Run app on your own device - $0 • Sell through Google Market - $25 • Easy to develop apps • Especially for Java Developers • Platform agnostic • Open Market (or download from anywhere) • Feature Rich platform

  3. Framework Overview http://developer.android.com/guide/basics/what-is-android.html

  4. Framework – Linux Kernel Core system services • Handles security, memory management, process management, network access, etc • Abstraction layer between OS and hardware

  5. Framework - Dalvik Virtual Machine • Optimized for mobile devices • Every app runs in its own instance of VM • Runs classes compiled by Java, and transformed into .dex files

  6. Framework - Libraries Variety of libraries to provide built in functionality.

  7. Framework – Application Framework Provides functionality to allow Applications to interact with underlying OS and other applications Designed to simplify the reuse of components, and allow applications to publish, or make use of the capabilities of other applications

  8. Framework – Applications The layer where custom-built applications live. This is the place where most mobile developers will interact with Android. Your App Here!

  9. Framework Overview

  10. Get Developer Tools • SDK • http://developer.android.com/sdk/index.html • Requires Java SDK (5.0 +) • Updating versions • What the different versions mean • ADT Plugin (for Eclipse) • http://developer.android.com/guide/developing/tools/adt.html • Need Eclipse Ganymede (3.4+) • Update site: https://dl-ssl.google.com/android/eclipse • Can develop without Eclipse

  11. Developer Tools (cont) • Android command • Emulator • Android Virtual Devices (AVD) • Android Debug Bridge (ADB) • Command line tool for interacting with phone/emulator. • Dalvik Debug Monitor Server (DDMS) • Debugging tool providing: screen capture, memory info, logging, info spoofing) http://developer.android.com/guide/developing/tools/index.html

  12. Developing an App • Create a new project • Project content overview • Code • Test on emulator (or device) • Debug • Sign • Export to device • As APK (Android PacKage file)

  13. Terminology • Most Commonly used elements • Activity • Intent • Manifest file • Resources and Assets • Layout • Fragment

  14. Terminology - Layout Layout – describes the UI of an activity • Enables separation of UI from logic • There are a variety of layouts you can use including: Linear, Table, Relative, and Frame

  15. Terminology - Activity Activity – (Noun) A single screen, your application is made up of one or more of these. • Always extends Activity

  16. Terminology - Intent Intent – (Verb) code to perform an action • Wiring between activities, services, broadcast receivers, or other functions • facility for late run-time binding between components in the same or different applications • Rich set of Intent in Android provide excellent way of executing specific actions

  17. Fragments Fragments represent a behavior or portion of a UI. • Designed to collect a unit of UI and behavior into a reusable component • Don’t have own lifecycle – and must be embedded in an Activity

  18. Fragments

  19. Terminology - Manifest Manifest File – describes your app • always named AndroidManifest.xml • declares the components of an application, describes security permissions required by the app, and lists required library dependencies

  20. Terminology - Resources Resource – text, pictures, sound, etc • are all abstracted from the code and logic • compiled and managed by system generated R.class file • Instantiate by getting reference to object

  21. Resources • Multiple Layouts and Graphic Assets • Can also be Used for language localization • Tip: use Density Independent Pixels (DP) • Draw9Patch

  22. Terminology - APK • Android Application File • User can install apps from many sources • Developer can upload updates easily

  23. Terminology – cont. • Other important elements • Widget • Service • Broadcast Receiver • Security and Permission • Content Provider

  24. Learn More • http://developer.android.com • Denver Droids • http://www.denverdroids.com/ • http://forum.xda-developers.com • http://www.stackoverflow.com • http://developer.android.com • Google Groups (Forums)

  25. Questions? • @mikewolfson • Google +: Mike Wolfson • mwolfson@gmail.com • Slideshare: http://www.slideshare.net/mswolfson • Dropbox: http://dl.dropbox.com/u/23589031/DJUG.zip • Beer?!

More Related