Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

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.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Developing for the Android Ecosystem

Introduction to the Android platform targeted towards people who are already familiar with developing Java applications.
by

Mike Wolfson

on 31 October 2016

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Developing for the Android Ecosystem

Developing for the
Android Ecosystem

Sheldon B. Lubar School of Business
by Mike Wolfson
Able Android
Open Handset Alliance
”Android was built from the ground up with the explicit goal to be the first open, complete, and free platform created specifically for mobile devices.”


http://www.openhandsetalliance.com
Free and Open
Open Source
No Licensing Cost *
No restrictions on use
http://source.android.com/download
Flavors of Android
AOSP
"With Google"
CyanogenMod
Amazon Fork
Release Cycle
Named after deserts
Iced Cream Sandwich (4.0.4) - latest
6 Month release cycle
Lots of Devices
More Variation
Rapid Growth
Open APIs
Low Barrier to entry
Open market
Easy to develop
(especially for Java Developers)
Feature Rich
Why Android ?
INTRO
DEVELOPMENT
Install
SDK
http://developer.android.com/sdk/index.html
Requires Java SDK (5.0 +)
Eclipse
Need Ganymede (3.4+)
http://www.eclipse.org/downloads/
ADT Plugin (for Eclipse)
https://dl-ssl.google.com/android/eclipse/
Can develop without Eclipse (InteliJ, NetBeans, etc)
ADB - Android Debug Bridge
Emulator
DDMS -Davik Debug Monitor Service
Android Tools
http://developer.android.com/guide/developing/tools/index.html
1. Create a new project
Project content overview
2. Code
3. Test on emulator (or device)
4. Debug
5. Sign
6. Export to device
As APK (Android PacKage file)
Steps to create
an app
Terminology
Activity
Intent
Manifest
Layout
Resources
Fragment
Activity
(Noun) A single screen, your application is made up of one or more of these.
Intent
(Verb) Code to perform an action
Wiring between activities, services, broadcast receivers, or other functions
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
Fragment
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
Fragment
Manifest
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
Resources
Text, pictures, sound, etc
Abstracted from the code
Compiled and managed by system generated R.class file
Instantiate by getting reference to object
Distribution
APK - Android Application File
User can install apps from many sources
Developer can upload updates easily
Important Concepts
Activity
Widget
Service
Broadcast Receiver
Security and Permission
Content Provider
Learn More
http://www.gtugs.org
http://forum.xda-developers.com
http://www.stackoverflow.com
http://developer.android.com
https://github.com/mwolfson/JUGDemoApp
Questions?
@mikewolfson
Google +: Mike Wolfson
https://plus.google.com/u/0/114182988463720945996
mike@ableandroid.com
Presentation & Downloads:
About Me
Center for Technology Innovation
Workshop
History
August 17, 2005
Google Acquires Android Inc.
November 5, 2007
Open Handset Alliance Unveiled
October 22, 2008
G1\Dream Introduced
Beta &
SDK
November 5, 2007
Initial Software released
November 6, 2009
Droid Introduced
exclusive to Verizon USA
NexusOne Introduced -
sold directly by Google
January 5, 2010
@mikewolfson
Android is
Different
October 2003
Android Inc. Founded
Android 1.0
Integration with Google Services
Web Browser
Android Market
Multi-tasking, SMS, Wifi, Bluetooth
April 30, 2009
Cupcake (1.5)
Soft keyboard
Bug fixes
Integration with Picassa and YouTube
September 23, 2008
September 15, 2009
Donut (1.6)
Voice Search
Integrated Video Camera
Battery Usage Indicator
October 26, 2009
Eclair (2.0)
Multiple Google Accounts
MS Exchange Support
New Browser with HTML5
May 20, 2010
Froyo (2.2)
Multiple Keyboard Language
Adobe Flash Support
December 6, 2010
Gingerbread (2.3)
Currently Most Popular Version
UI Refinements
Copy\Paste
Matias Duarte hired as Senior Director, Android User Experience
May 2010
May 10, 2011
Honeycomb (3.0)
Tablet-centric UI
Rich notifications and widget enhancements
Bluetooth tethering
Support for Media/Picture Transfer Protocol
October 20, 2011
Ice Cream Sandwich (4.0)
'Holographic UI' for both Phone and Tablet
Many UI improvements (icon folders, resizeable widgets, keyboard, cut\paste, etc)
Soft system buttons
USB Peripheral Support
? June, 2012 ?
Jelly Bean (5.0)
Google Chrome Browser
Native File Browser and Malware software
More UI Enhancements
Voice Assistant
| * * *
| * * *
| * * *
| * * *
| * * *
| * * *
| * * *
| * * *
| * * *
2003
2004
2005
2006
2007
2008
2009
2010
2011
| * * *
2012
iPhone Released
Had: Multi-touch, Safari Web Browser, Threaded Text Messaging
Didn't have: MMS, Apps, Copy\Paste
US Only at first
Touchscreen only
June 29, 2007
Pre-installed on iPhone 3G
Provided direct revenue stream for independent developers
July 10, 2008
App Store
Free
Open-source
Hardware Agnostic
Not controlled by single company\organization
Future
Devices
Further Fragmentation
Branch
Framework
Application
System
Kernel
Core system services
Handles security, memory management, process management, network access, etc
Abstraction layer between OS and hardware
Framework Libraries
Open GL – custom 2D lib; 3D graphics are based on OpenGL ES 1.0 specification
SQLite - for structured data storage
Integrated browser based on the open source WebKit engine
Media - support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
Camera, GPS, compass, and accelerometer (hardware dependent)
Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE
Dalvik Runtime
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
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
Applications
Your App Here
The layer where custom-built applications live.
This is the place where most mobile developers will interact with Android.
FRAMEWORK
CONCEPTS

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
Development is Platform agnostic
Open Market (or download from anywhere)
Feature Rich platform
For Companies
For Developers
Design
Design Documentation
Dashboard
Action Bar
View Pager
Anti-Patterns
AsyncTask
Documentation
http://developer.android.com/design
Style:
App Structure
Style Guide
Writing Guide
Typography
Usage Guides:
Navigation
Gestures
Controls
Anti-Patterns
It's not an iPhone
Back Button
Navigation on Bottom of Page
Action Bar
Dedicated real estate at top of screen to support navigation, and frequently used operations
Replaces Title Bar
Quick link back to home
Use:
To bring key actions to front
To convey sense of place
Consistently
Dashboard
A quick highlight of most important capabilities of application
Highlight new content
Full screen
Organize by features, categories, accounts
Focus on 3 – 6 most important activities
What it is:
Support for Fragments
Support for ViewPager
etc.
Install with SDK Manager
Install with Android Menu
Horizontal View Swiping
Use swipe to flatten flatten vertical hierarchies and improve access to related data actions
User performs the swipe gesture to switch between views.
Only use swipe navigation (replace buttons, etc)
Provide user contextual information to indicate view.
Widget
Used to display an application's most relevant information on a user's Home screen.
Limited Controls (no text input, etc)
Updated at specific intervals
Service
Used for any application that needs to persist for a long time
Allows for running process in background, or based on time interval
Does not require user interaction
Tied to application, and can be killed by system if not defined correctly
Broadcast Receiver
Key communication mechanism
Mechanism to allow application to respond to system-wide broadcast messages
System messages:
Battery low, App Installed, Screen Unlocked, etc
Application messages:
Notifications that app data has been downloaded
Really just a "gateway" to other components, not intended to do large amount of work
Content Providers
Job is to manage access to persisted data between applications
Publishes data to system, not requiring direct access from apps
Ex. ContactsProvider, etc
Activity
Represents a UI element of an application
The actual screens the user sees
Security & Permissions
Android is a privilege-separated operating system, the same as Linux
Linux isolates applications from each other and from the system.
Permissions provide control of finer-grained security features. This mechanism enforces restrictions on the specific operations that a particular process can perform
Developer must request particular permissions, that must be granted by user
Native Development Kit (NDK)
Companion to the Android SDK that lets you build performance-critical portions of your apps in native code (C or C++)
Often done to improve performance, or to use an existing legacy code-base
Allows access to native libraries communicating via JNI
Discouraged from using, and doesn't necessarily always improve performance
Open Accessory Development Kit (ADK)
Kit designed to bridge Android devices with physical devices
Implementation of an Android USB accessory
Based on the Arduino open source electronics prototyping platform
http://developer.android.com/guide/topics/usb/adk.html
PULLING IT
TOGETHER

Download Project
(follow along)
Download Project:
http://goo.gl/z2dpA
Unzip project to desktop
In Eclipse: File\Import\Import Existing Project into workspace
Agenda
Distributon
The Play Market
Tricks
Deeper into the ADT
Tricks
Update Often
Translate Description
Have Complete Promo Assets
YouTube Video
Follow Design Patterns
Un-installs hurt
Play Market
Web-based app control
Statistics
User Accounts
Alternative stats:
Distimo
App Annie
AndroidPIT
AppBrain
Developer
Tools Anatomy
Eclipse
Android
ADT Plugin
Command-line
Support JAR
Sign APK
Self-signed Cert OK
Generate Using Java keytools
Use Wizard
Keep track of the certifiate!
Don't perform long running operations on Main\UI thread
Mechanism for offloading long-running process to background
Tools
"The Developer Tools for Android are being developed entirely in the open and is accepting contributions"
http://tools.android.com/
Current version - ADT 20 preview
Seperate from Android Framework team
Alernatives to
Play Market
Kindle Fire
B&N Nook
AppBrain
AndroidPIT
adb logcat MyApp:* *:s
adb logcat -b radio
Debug
Any phone can be development device
Set Phone to Debug
Install USB Driver:
ADB
Android Virtual Device
AVD\SDK Manager
Customize (skins, hardware emulation)
Emulate different phones
.android folder (images for initial configuration, SD card\data; snapshots)
Android Debug Bridge
Device Interaction
Networking
Linux Shell
Logcat
Monkey
Proguard\Zipalign
monkeyrunner
Visual Dev Tools
Lint
* brief — Display priority/tag and PID of originating process (the default format).

* process — Display PID only.

* tag — Display the priority/tag only.

* thread — Display process:thread and priority/tag only.

* raw — Display the raw log message, with no other metadata fields.

* time — Display the date, invocation time, priority/tag, and PID of the originating process.

* long — Display all metadata fields and separate messages with blank lines.
Hierarchy Viewer
Tree View
Pixel Perfect Viewer
Lint
Writing
Reading
Eclipse Template
Push\Pull
Install
Logcat
SQLLite
Memory
UI Optimization
http://developer.android.com/guide/developing/debugging/debugging-ui.html
Log.v ("MyTag", "Log Message");
Preferences \ Java \ Editor \ Templates
Settings: Applications \ Development\ USB Debugging - Enable
http://developer.android.com/sdk/oem-usb.html
http://developer.android.com/guide/developing/tools/adb.html
View Alternative
Log Buffers
Control Output Format
adb logcat -v thread
View Alternative Log Buffers
Emulator
Capabilities
Limitations
Google Services (Android Market, Gmail, etc)
No real phone calls
Graphics Support
Touch Events
Accessory integration (USB, headphone, etc)
Slow
Simulate Telephony (latency, connectivity; events)
Simulate Location
Emulate hardware
Networking (Port redirection; DNS; Proxy)
ARM Emulation
Media (audio not video)
http://developer.android.com/guide/developing/devices/emulator.html
Essential
Tools
Emulator
ADB
Logcat
Memory Management
UI Optimization
Eclipse Logcat Viewer
UI for Logcat viewing\filtering
Use Regex to isolate messages
Save favorite filters
AVD
Device View
Simulate Call or SMS
Change Radio Connectivity
Take screen shot
File Explorer
Other tools
DDMS - Dalvik Debug Monitor Service
Task Management
File Management
Device Info
Emulator Control
Application Statistics
Memory Tools
Threads
Heap
Allocation Tracker
Emulator Control
Agenda
Android Framework
Component definition
Design Patterns
Optional components
NDK
ADK
For Companies
Alpha
Beta
Cupcake (1.5)
Donut (1.6)
Eclaire (2.0)
Froyo (2.1)
Gingerbread (2.3)
Honeycomb (3.0)
Ice Cream Sandwich (4.0)
*JellyBean (?)
Dropbox - (Downloadable Prezi, PDFs, Project) - http://goo.gl/6F2nG
Prezi - http://goo.gl/z2dpA

Dropbox - (Offline Prezi, PDFs, Project) - http://goo.gl/6F2nG
Prezi - http://goo.gl/z2dpA
Full transcript