Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Android Basics

Basic Android Development

Jonathan Voigt

on 12 July 2011

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Android Basics

Android Basics Market Architecture The Development Environment Eclipse Plugin (ADT) $25 one-time fee
Development and debugging are free
15 minute returns
Reinstallations of purchased apps must be free Android SDK SDK contains dalvik compiler, libraries, emulator Sensors Accelerometers
Ambient light
Magnetic field
Near field communication (NFC)
USB/Breakout boards (ioio)
Atmospheric pressure (!?) More than just a portable computer Can't use sensors in web app Optimization Dalvik has interesting optimization practices Things like:
Prefer static over virtual
Avoid internal getters/setters
Use static final when possible
Package instead of private for inner classes
More... http://developer.android.com/guide/practices/design/performance.html
http://code.google.com/p/caliper/ Application Fundamentals Activities Services Content providers Broadcast receivers Mostly foreground
GUI screens
One program often has multiple activities Background workers
Downloads, computations
Headless, no GUI
Others "bind" to service Sharing data with other applications
Databases, local files, cloud Respond to events Java but not a JVM (different bytecode)
Reimplemented (and incomplete) API
Optimized for embedded systems Each application has its own Linux account Activity Breakdown of Typical Mail App List mail
Read mail
Compose mail
Preferences http://www.sparkfun.com/products/10585 2.6 Eclipse is not technically required for development http://developer.android.com/sdk/index.html http://developer.android.com/sdk/eclipse-adt.html Device/Emulator Emulator included with SDK Use any Android device (enable in settings) Slow but useful (especially for screen sizes) Similar to Arduino Log.w("Component", "Interesting warning-level message."); Or maybe you can... I don't know Project Layout Activity Life Cycle Intents and Back Stack The Back button pops activities off of the back stack. activity activity activity Applications can be installed outside of the market ecosystem Requires carrier support and preferences settings Applications still can't bypass security restrictions without "rooting" Jonathan Voigt
May 2011 Their Javascript stuff is quite powerful intent: scan barcode intent (Cancel compose using Back) Message List open a message Read Message reply Compose Read Message Message List back back All Android phones have a dedicated "Back" button Activities are started with Intents activity new activity intent to start new activity New activities are pushed on to a stack called the "back stack" Activity Modularity Activities can be reused by other activities I want to scan a barcode Other activities are in separate processes:
The back stack spans multiple processes Barcode Scanner (separate app) (if they let them) Email Read Message View Webpage Look at Map click a message click a link in email highlight an address intent: read message intent: view http page intent: view street address Background processes may get destroyed to free up resources for foreground activities.
The stack and state to restore everything are preserved. Might be in software but it is "OS-level" Note: many different things may register as intent handlers, the user can select one in a modal dialog or define a default Per publisher--any number of apps
Full transcript