SlideShare a Scribd company logo
1 of 47
Download to read offline
  Copyright © 2013 CommonsWare, LLC
Android
Development...
The 20,000-Foot
View
  Copyright © 2013 CommonsWare, LLC
Welcome to Android!
● Traditional Development Model
– Java, XML, and other good stuff
● Alternative Development Models
– Other languages
– Native development
– HTML5 and hybrid apps
– Games
– Other cross-platform options
  Copyright © 2013 CommonsWare, LLC
Basket of Components
● Activity
– Primary unit of user interface
– Think: screen, page, window
– “User transaction”
  Copyright © 2013 CommonsWare, LLC
Basket of Components
● Service
– Long-running task (download)
– User-controlled background task (music player)
– “Cron job” (check for unread email)
– Integration point (third-party API)
  Copyright © 2013 CommonsWare, LLC
Basket of Components
● Broadcast Receiver
– System events (battery low)
– Application messages
● Content Provider
– Integration point (expose database)
– Abstraction layer (hide database internally)
  Copyright © 2013 CommonsWare, LLC
Activities, Fragments, & Widgets
● Activities HostWidgets
– Widget = micro unit of UI
– Organized via layout managers
– Described using XML
● Activity as a whole
● Portions of an activity (rows in a selection list)
  Copyright © 2013 CommonsWare, LLC
Activities, Fragments, & Widgets
● Fragments ManageWidgets
– Reuse for multiple screen sizes
– Reuse for multiple instances
● Horizontal swiping strategies
  Copyright © 2013 CommonsWare, LLC
Activities, Fragments, & Widgets
● Multiple Layout Flavors
– Portrait versus landscape
– Normal versus large
– Touchscreen versus pointer (trackball)
● Flow =Web-Like
– Click to launch new activities
– BACK button
– HOME button
  Copyright © 2013 CommonsWare, LLC
Java and Dalvik
● WhatYouWrite
– Java
– XML
– C/C++ (optional)
  Copyright © 2013 CommonsWare, LLC
Java and Dalvik
● What Android Runs: Dalvik
– Virtual machine, like Perl or Java
– Build tools translate your Java code to Dalvik
bytecode
– Usually invisible to you
  Copyright © 2013 CommonsWare, LLC
Resources
● Non-Java Application Assets
– Layouts
– Images (PNG, JPEG, etc.)
– Audio clips
– Strings
– Animations
– Menus
– Etc.
  Copyright © 2013 CommonsWare, LLC
Resources
● Resource Sets
– Language
– Screen density
– Screen size
– Dozens of other criteria
  Copyright © 2013 CommonsWare, LLC
Tools
● Eclipse...
– Android DeveloperTools plugin
– GUI preview mode
  Copyright © 2013 CommonsWare, LLC
Tools
● ...or Android Studio...
– New IDE, based on IntelliJ IDEA, under
development at Google
– “Early access preview” available today
● Broken enough that is mostly for seasoned Android
developers
– Should be the long-term focus
  Copyright © 2013 CommonsWare, LLC
Tools
● ...Or Not
– IntelliJ IDEA
– NetBeans
– No particular IDE
● Platforms
– Linux
– OS X
– Windows
  Copyright © 2013 CommonsWare, LLC
Demo: Hello,
World
  Copyright © 2013 CommonsWare, LLC
Intents and Integration
● Intents as Message Bus
– Start an activity
– Start a service
– Send a broadcast
  Copyright © 2013 CommonsWare, LLC
Intents and Integration
● Use Intents Internally
– Start your own activities
– Start your own services
– Send your own “narrowcasts”
● Service activity or notification→
– Send your own “broadcasts” to third parties
  Copyright © 2013 CommonsWare, LLC
Intents and Integration
● Use Intents Externally
– Send a message with the user's choice of “send”
application (email? SMS?Twitter? Facebook?)
– Offer to view a certain MIME type
– Launch an OS-supplied activity (map)
– Launch a third-party activity
– Implement a plug-in system
  Copyright © 2013 CommonsWare, LLC
The Manifest
● AndroidManifest.xml, in project root
● Table of contents
● Additional metadata
– App and OS versions
– Requested and required permissions
– Supported screen sizes
  Copyright © 2013 CommonsWare, LLC
Notable OS Features
● Data Stores
– SQLite: relational database engine, in-process
– Files
● Internal: not accessible by user
● External: accessible by user via mounting device
– Shared Preferences
● Mostly for user settings
● GUI framework for collecting these
  Copyright © 2013 CommonsWare, LLC
Notable OS Features
● Notifications
– Put icon in status bar (phones) or system bar
(tablets) or elsewhere (TVs)
– Optional hardware alerts
● Ringtone, vibration, etc.
– Designed to let user know of work being done in
the background
  Copyright © 2013 CommonsWare, LLC
Notable OS Features
● Multimedia
– Audio, video
● Decent but not infinite roster of formats/codecs
● Some codecs are commercial, may not always be
present
– Recording, playback
– Local, streaming
  Copyright © 2013 CommonsWare, LLC
Notable OS Features
● Locations
– GPS
– WiFi hotspot proximity
– Cell tower triangulation
● Maps
– Google Maps
– Third-party mapping engines
  Copyright © 2013 CommonsWare, LLC
Notable OS Features
● Sensors
– Accelerometer
– Gyroscope
– Orientation
– Ambient Light
– Barometric Pressure
– Etc.
  Copyright © 2013 CommonsWare, LLC
Notable OS Features
● Other Hardware
– Telephony
– WiFi
– Bluetooth
– NFC
– Cameras
– USB
  Copyright © 2013 CommonsWare, LLC
Production
● APK File
– Android “executable”
– Digitally signed (self-signed certificate)
– Freely distributable
● Not limited to Android Market or any other single
venue
  Copyright © 2013 CommonsWare, LLC
Production
● Play Store
– $25 setup fee
– Upload and go
● Available on many devices within hours of release
● Other Markets Available
– Example: Amazon Appstore for Android
● Self-Distribution
  Copyright © 2013 CommonsWare, LLC
But, What If I
Hate Java?
  Copyright © 2013 CommonsWare, LLC
Varying Definitions of ”Native”
● Native = C/C++
– In comparison to Java
● Native = Java
– In comparison to HTML5 and hybrid apps
  Copyright © 2013 CommonsWare, LLC
Native C/C++ Development
● Native Development Kit (NDK)
– Allows you to write C/C++ libraries, link into your
Android app
● Pros
– Speed
– Possible reuse across platforms
  Copyright © 2013 CommonsWare, LLC
Native C/C++ Development
● Cons
– CPU architectures (x86 vs. ARM vs. MIPS)
– May not like C/C++ any more than Java
● Pattern #1: Extension Library
– Migrate select algorithms into native code
– Examples: image processing, signal processing,
game AI
  Copyright © 2013 CommonsWare, LLC
Native C/C++ Development
● Pattern #2: Complete App
– Eschew all trappings of traditional apps
– Mostly for OpenGL/OpenSL games
  Copyright © 2013 CommonsWare, LLC
HTML5 Web Apps
● TraditionalWeb development, writ small
● Key: Cache Manifest
– Designate files that should be cached, beyond
standard ephemeral cache
– Objective: Allow app to be run offline
● Other Facets of HTML5 Specification
– Storage,WebSockets, video, camera, location
tracking, etc.
  Copyright © 2013 CommonsWare, LLC
HTML5 Web Apps
● Pros
– May already haveWeb development talent
– Cross-platform
● Cons
– Need touch-aware coding/libraries
– Discoverability an issue
● Play Store does not listWeb apps
● Amazon Appstore for Android does
  Copyright © 2013 CommonsWare, LLC
Hybrid Apps
● HTML5 UI on a (Java) Native Foundation
– Package up HTML/CSS/JS/images into APK
– Gives you access to APIs beyond HTML5 specs
● Most Popular: PhoneGap
– Adobe product, based on Apache Cordova
– Cross-platform
– Optional hosted build service
  Copyright © 2013 CommonsWare, LLC
Hybrid Apps
● Pros
– Closer to native apps for distribution and
capability
● Cons
– Not a native UI
● Big or small problem depending upon audience
– Cannot do everything that a native app can
  Copyright © 2013 CommonsWare, LLC
Game Engines
● Android-Specific
– AndEngine, Box2D
● Cross-Platform
– Unity 3D, Cocos 2D, Corona, Havok, libGDX,
Proton
● Dozens of others
  Copyright © 2013 CommonsWare, LLC
Other Cross-Platform Options
● Titanium Mobile
– Develop in JavaScript, but manipulating native
widgets (not HTML)
● Adobe AIR
– Well, OK, sorta cross-platform...
● Xamarin
– .NET for Android (MonoDroid)
  Copyright © 2013 CommonsWare, LLC
Other Cross-Platform Options
● Sencha
– Offers own PhoneGap-style hybrid engine for
use with SenchaTouch-based apps
● MoSync
– Another take on hybrid app engine
● Rhodes
– Web apps, but with Ruby “server”
  Copyright © 2013 CommonsWare, LLC
App Inventor
● Drag-and-Drop
– UI
– Code via pluggable “blocks”
● Originally created by Google educational unit
● Contributed to MIT Media Lab, open source
● Apps not really suited for distribution
  Copyright © 2013 CommonsWare, LLC
App Generators
● Canned “Fill-in-the-Blanks” Apps
– You provide details, it generates custom app on
a server for you to download and distribute
● Focuses
– Specific verticals (e.g., restaurants) via
vertical-specific templates
– General “oh, we should have an app” firms
  Copyright © 2013 CommonsWare, LLC
OK, So How
Do I Choose?
  Copyright © 2013 CommonsWare, LLC
Who IsThe User?
● Public Distribution?
– UI/UX is fairly important for acceptance, good
reviews
– Should look like other apps of its ilk
● Internal Distribution?
– Long history of crap
– Look-and-feel issues tend to be lower concern
  Copyright © 2013 CommonsWare, LLC
What Does the User Use?
● Supplied Device?
– If so, and if Android, all options on the table
● BYOD?
– AndroidToday (think multi-native
implementation)
– AndroidTomorrow (think cross-platform)
– Android Forever (gain deep experience in one
area)
  Copyright © 2013 CommonsWare, LLC
What DoYou Need?
● More Device-Centric, More Native
– Contacts?
– Camera?
– Background data syncing?
– Notifications?
● Simpler Requirements = More Flexibility in
Development Choice
  Copyright © 2013 CommonsWare, LLC
What DoYou Know?
● All Else Equal, Pick a Gentle Learning Curve
– Unless learning is the objective...
– ...and all else may not be equal
● Benefits to Existing Experience
– Level of effort = time/expense budget
– Deadlines

More Related Content

What's hot

Using the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidUsing the Presentation API and external screens on Android
Using the Presentation API and external screens on Android
Xavier Hallade
 
Droidcon2013 miracast final2
Droidcon2013 miracast final2Droidcon2013 miracast final2
Droidcon2013 miracast final2
Droidcon Berlin
 
Chapter 7
Chapter 7 Chapter 7
Chapter 7
carnillr
 
Software (fundamentals)
Software (fundamentals)Software (fundamentals)
Software (fundamentals)
JDoughty1
 

What's hot (11)

Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManagerSecondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
 
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
 
07 interface design
07 interface design07 interface design
07 interface design
 
Using the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidUsing the Presentation API and external screens on Android
Using the Presentation API and external screens on Android
 
Droidcon2013 miracast final2
Droidcon2013 miracast final2Droidcon2013 miracast final2
Droidcon2013 miracast final2
 
Integration of OSGi and User Friendly UI Application - Akira Moriguchi
Integration of OSGi and User Friendly UI Application - Akira MoriguchiIntegration of OSGi and User Friendly UI Application - Akira Moriguchi
Integration of OSGi and User Friendly UI Application - Akira Moriguchi
 
Jure Sustersic Monetization through Ovi Services
Jure Sustersic Monetization through Ovi ServicesJure Sustersic Monetization through Ovi Services
Jure Sustersic Monetization through Ovi Services
 
Chapter 7
Chapter 7 Chapter 7
Chapter 7
 
Software (fundamentals)
Software (fundamentals)Software (fundamentals)
Software (fundamentals)
 
Part one
Part one Part one
Part one
 
Multimedia
MultimediaMultimedia
Multimedia
 

Viewers also liked

Taipei gtug opening
Taipei gtug openingTaipei gtug opening
Taipei gtug opening
Fred Lin
 

Viewers also liked (9)

人人能編程是可能的嗎?
人人能編程是可能的嗎?人人能編程是可能的嗎?
人人能編程是可能的嗎?
 
Taipei gtug opening
Taipei gtug openingTaipei gtug opening
Taipei gtug opening
 
Firefox os how large open source project works
Firefox os   how large open source project worksFirefox os   how large open source project works
Firefox os how large open source project works
 
Google IO 2011 recap
Google IO 2011 recapGoogle IO 2011 recap
Google IO 2011 recap
 
Steps to contribute to firefox os (gaia)
Steps to contribute to firefox os (gaia)Steps to contribute to firefox os (gaia)
Steps to contribute to firefox os (gaia)
 
How to create 360 Image/panorama & share with WebVR?
How to create  360 Image/panorama & share with WebVR?How to create  360 Image/panorama & share with WebVR?
How to create 360 Image/panorama & share with WebVR?
 
Firefox OS overview
Firefox OS overviewFirefox OS overview
Firefox OS overview
 
Android + jenkins
Android + jenkinsAndroid + jenkins
Android + jenkins
 
Blocklyduino Poster
Blocklyduino PosterBlocklyduino Poster
Blocklyduino Poster
 

Similar to Android Development: The 20,000-Foot View

Shaping a Technology Strategy for Mobile Development
Shaping a Technology Strategy for Mobile DevelopmentShaping a Technology Strategy for Mobile Development
Shaping a Technology Strategy for Mobile Development
frog
 
Synapse india reviews on android application
Synapse india reviews on android applicationSynapse india reviews on android application
Synapse india reviews on android application
saritasingh19866
 
Android and android phones
Android and android phonesAndroid and android phones
Android and android phones
Dennise Layague
 

Similar to Android Development: The 20,000-Foot View (20)

From Android to the Mobile Web
From Android to the Mobile WebFrom Android to the Mobile Web
From Android to the Mobile Web
 
Mobinius : Mobile Native vs Cross Platform
Mobinius : Mobile Native vs Cross PlatformMobinius : Mobile Native vs Cross Platform
Mobinius : Mobile Native vs Cross Platform
 
Shaping a Technology Strategy for Mobile Development
Shaping a Technology Strategy for Mobile DevelopmentShaping a Technology Strategy for Mobile Development
Shaping a Technology Strategy for Mobile Development
 
What's New in Jelly Bean
What's New in Jelly BeanWhat's New in Jelly Bean
What's New in Jelly Bean
 
Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012
 
Android quick talk
Android quick talkAndroid quick talk
Android quick talk
 
Android
AndroidAndroid
Android
 
Android : Deep dive into developing MobileApp using Android
Android : Deep dive into developing MobileApp using AndroidAndroid : Deep dive into developing MobileApp using Android
Android : Deep dive into developing MobileApp using Android
 
Getting started
Getting startedGetting started
Getting started
 
Android Fundamentals, Architecture and Versions
Android Fundamentals, Architecture and VersionsAndroid Fundamentals, Architecture and Versions
Android Fundamentals, Architecture and Versions
 
How Android is different from other systems – An exploration of the design de...
How Android is different from other systems – An exploration of the design de...How Android is different from other systems – An exploration of the design de...
How Android is different from other systems – An exploration of the design de...
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Mobile Application development
Mobile Application developmentMobile Application development
Mobile Application development
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Synapse india reviews on android application
Synapse india reviews on android applicationSynapse india reviews on android application
Synapse india reviews on android application
 
AndroidOverview
AndroidOverviewAndroidOverview
AndroidOverview
 
Lecture 01: Introduction into Android.pptx
Lecture 01: Introduction into Android.pptxLecture 01: Introduction into Android.pptx
Lecture 01: Introduction into Android.pptx
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Android and android phones
Android and android phonesAndroid and android phones
Android and android phones
 
First Steps with Android - An Exciting Introduction
First Steps with Android - An Exciting IntroductionFirst Steps with Android - An Exciting Introduction
First Steps with Android - An Exciting Introduction
 

More from CommonsWare

Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable ProjectsGradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
CommonsWare
 

More from CommonsWare (20)

Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable ProjectsGradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
 
The Action Bar: Front to Back
The Action Bar: Front to BackThe Action Bar: Front to Back
The Action Bar: Front to Back
 
Android Security: Defending Your Users
Android Security: Defending Your UsersAndroid Security: Defending Your Users
Android Security: Defending Your Users
 
Mastering the Master Detail Pattern
Mastering the Master Detail PatternMastering the Master Detail Pattern
Mastering the Master Detail Pattern
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful Threading
 
Maps V2... And You!
Maps V2... And You!Maps V2... And You!
Maps V2... And You!
 
A Deep Dive Into ViewPager
A Deep Dive Into ViewPagerA Deep Dive Into ViewPager
A Deep Dive Into ViewPager
 
Integrate Android Apps and Web Apps
Integrate Android Apps and Web AppsIntegrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
 
X Means Y
X Means YX Means Y
X Means Y
 
The Wonderful World of Wearables
The Wonderful World of WearablesThe Wonderful World of Wearables
The Wonderful World of Wearables
 
Securing User Data with SQLCipher
Securing User Data with SQLCipherSecuring User Data with SQLCipher
Securing User Data with SQLCipher
 
Beaming Data to Devices with NFC
Beaming Data to Devices with NFCBeaming Data to Devices with NFC
Beaming Data to Devices with NFC
 
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business ModelsMaking Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business Models
 
AppsWorld Keynote
AppsWorld KeynoteAppsWorld Keynote
AppsWorld Keynote
 
App Integration (Revised and Updated)
App Integration (Revised and Updated)App Integration (Revised and Updated)
App Integration (Revised and Updated)
 
Rich Text Editing and Beyond
Rich Text Editing and BeyondRich Text Editing and Beyond
Rich Text Editing and Beyond
 
App integration: Strategies and Tactics
App integration: Strategies and TacticsApp integration: Strategies and Tactics
App integration: Strategies and Tactics
 
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and TacticsBackwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and Tactics
 
Android Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... OddAndroid Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... Odd
 
If I Were Starting Now
If I Were Starting NowIf I Were Starting Now
If I Were Starting Now
 

Recently uploaded

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...
Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...
Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...
baharayali
 

Recently uploaded (20)

Muzaffarpur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Muzaffarpur Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMuzaffarpur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Muzaffarpur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Sector 62, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 62, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Spain Vs Italy Spain to be banned from participating in Euro 2024.docx
Spain Vs Italy Spain to be banned from participating in Euro 2024.docxSpain Vs Italy Spain to be banned from participating in Euro 2024.docx
Spain Vs Italy Spain to be banned from participating in Euro 2024.docx
 
Albania Vs Spain South American coaches lead Albania to Euro 2024 spot.docx
Albania Vs Spain South American coaches lead Albania to Euro 2024 spot.docxAlbania Vs Spain South American coaches lead Albania to Euro 2024 spot.docx
Albania Vs Spain South American coaches lead Albania to Euro 2024 spot.docx
 
Personal Brand Exploration - By Bradley Dennis
Personal Brand Exploration - By Bradley DennisPersonal Brand Exploration - By Bradley Dennis
Personal Brand Exploration - By Bradley Dennis
 
JORNADA 6 LIGA MURO 2024TUXTEPECOAXACA.pdf
JORNADA 6 LIGA MURO 2024TUXTEPECOAXACA.pdfJORNADA 6 LIGA MURO 2024TUXTEPECOAXACA.pdf
JORNADA 6 LIGA MURO 2024TUXTEPECOAXACA.pdf
 
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docxUEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
 
Sports Writing (Rules,Tips, Examples, etc)
Sports Writing (Rules,Tips, Examples, etc)Sports Writing (Rules,Tips, Examples, etc)
Sports Writing (Rules,Tips, Examples, etc)
 
Ramban Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts In...
Ramban  Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts In...Ramban  Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts In...
Ramban Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts In...
 
Netherlands Players expected to miss UEFA Euro 2024 due to injury.docx
Netherlands Players expected to miss UEFA Euro 2024 due to injury.docxNetherlands Players expected to miss UEFA Euro 2024 due to injury.docx
Netherlands Players expected to miss UEFA Euro 2024 due to injury.docx
 
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docxSlovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
 
Hire 💕 8617697112 Kasauli Call Girls Service Call Girls Agency
Hire 💕 8617697112 Kasauli Call Girls Service Call Girls AgencyHire 💕 8617697112 Kasauli Call Girls Service Call Girls Agency
Hire 💕 8617697112 Kasauli Call Girls Service Call Girls Agency
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...
Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...
Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...
 
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
 
Cricket Api Solution.pdfCricket Api Solution.pdf
Cricket Api Solution.pdfCricket Api Solution.pdfCricket Api Solution.pdfCricket Api Solution.pdf
Cricket Api Solution.pdfCricket Api Solution.pdf
 
Croatia vs Italy Euro Cup 2024 Three pitfalls for Spalletti’s Italy in Group ...
Croatia vs Italy Euro Cup 2024 Three pitfalls for Spalletti’s Italy in Group ...Croatia vs Italy Euro Cup 2024 Three pitfalls for Spalletti’s Italy in Group ...
Croatia vs Italy Euro Cup 2024 Three pitfalls for Spalletti’s Italy in Group ...
 
Unveiling the Mystery of Main Bazar Chart
Unveiling the Mystery of Main Bazar ChartUnveiling the Mystery of Main Bazar Chart
Unveiling the Mystery of Main Bazar Chart
 
JORNADA 5 LIGA MURO 2024INSUGURACION.pdf
JORNADA 5 LIGA MURO 2024INSUGURACION.pdfJORNADA 5 LIGA MURO 2024INSUGURACION.pdf
JORNADA 5 LIGA MURO 2024INSUGURACION.pdf
 
Italy vs Albania Italy Euro 2024 squad Luciano Spalletti's full team ahead of...
Italy vs Albania Italy Euro 2024 squad Luciano Spalletti's full team ahead of...Italy vs Albania Italy Euro 2024 squad Luciano Spalletti's full team ahead of...
Italy vs Albania Italy Euro 2024 squad Luciano Spalletti's full team ahead of...
 

Android Development: The 20,000-Foot View

  • 1.   Copyright © 2013 CommonsWare, LLC Android Development... The 20,000-Foot View
  • 2.   Copyright © 2013 CommonsWare, LLC Welcome to Android! ● Traditional Development Model – Java, XML, and other good stuff ● Alternative Development Models – Other languages – Native development – HTML5 and hybrid apps – Games – Other cross-platform options
  • 3.   Copyright © 2013 CommonsWare, LLC Basket of Components ● Activity – Primary unit of user interface – Think: screen, page, window – “User transaction”
  • 4.   Copyright © 2013 CommonsWare, LLC Basket of Components ● Service – Long-running task (download) – User-controlled background task (music player) – “Cron job” (check for unread email) – Integration point (third-party API)
  • 5.   Copyright © 2013 CommonsWare, LLC Basket of Components ● Broadcast Receiver – System events (battery low) – Application messages ● Content Provider – Integration point (expose database) – Abstraction layer (hide database internally)
  • 6.   Copyright © 2013 CommonsWare, LLC Activities, Fragments, & Widgets ● Activities HostWidgets – Widget = micro unit of UI – Organized via layout managers – Described using XML ● Activity as a whole ● Portions of an activity (rows in a selection list)
  • 7.   Copyright © 2013 CommonsWare, LLC Activities, Fragments, & Widgets ● Fragments ManageWidgets – Reuse for multiple screen sizes – Reuse for multiple instances ● Horizontal swiping strategies
  • 8.   Copyright © 2013 CommonsWare, LLC Activities, Fragments, & Widgets ● Multiple Layout Flavors – Portrait versus landscape – Normal versus large – Touchscreen versus pointer (trackball) ● Flow =Web-Like – Click to launch new activities – BACK button – HOME button
  • 9.   Copyright © 2013 CommonsWare, LLC Java and Dalvik ● WhatYouWrite – Java – XML – C/C++ (optional)
  • 10.   Copyright © 2013 CommonsWare, LLC Java and Dalvik ● What Android Runs: Dalvik – Virtual machine, like Perl or Java – Build tools translate your Java code to Dalvik bytecode – Usually invisible to you
  • 11.   Copyright © 2013 CommonsWare, LLC Resources ● Non-Java Application Assets – Layouts – Images (PNG, JPEG, etc.) – Audio clips – Strings – Animations – Menus – Etc.
  • 12.   Copyright © 2013 CommonsWare, LLC Resources ● Resource Sets – Language – Screen density – Screen size – Dozens of other criteria
  • 13.   Copyright © 2013 CommonsWare, LLC Tools ● Eclipse... – Android DeveloperTools plugin – GUI preview mode
  • 14.   Copyright © 2013 CommonsWare, LLC Tools ● ...or Android Studio... – New IDE, based on IntelliJ IDEA, under development at Google – “Early access preview” available today ● Broken enough that is mostly for seasoned Android developers – Should be the long-term focus
  • 15.   Copyright © 2013 CommonsWare, LLC Tools ● ...Or Not – IntelliJ IDEA – NetBeans – No particular IDE ● Platforms – Linux – OS X – Windows
  • 16.   Copyright © 2013 CommonsWare, LLC Demo: Hello, World
  • 17.   Copyright © 2013 CommonsWare, LLC Intents and Integration ● Intents as Message Bus – Start an activity – Start a service – Send a broadcast
  • 18.   Copyright © 2013 CommonsWare, LLC Intents and Integration ● Use Intents Internally – Start your own activities – Start your own services – Send your own “narrowcasts” ● Service activity or notification→ – Send your own “broadcasts” to third parties
  • 19.   Copyright © 2013 CommonsWare, LLC Intents and Integration ● Use Intents Externally – Send a message with the user's choice of “send” application (email? SMS?Twitter? Facebook?) – Offer to view a certain MIME type – Launch an OS-supplied activity (map) – Launch a third-party activity – Implement a plug-in system
  • 20.   Copyright © 2013 CommonsWare, LLC The Manifest ● AndroidManifest.xml, in project root ● Table of contents ● Additional metadata – App and OS versions – Requested and required permissions – Supported screen sizes
  • 21.   Copyright © 2013 CommonsWare, LLC Notable OS Features ● Data Stores – SQLite: relational database engine, in-process – Files ● Internal: not accessible by user ● External: accessible by user via mounting device – Shared Preferences ● Mostly for user settings ● GUI framework for collecting these
  • 22.   Copyright © 2013 CommonsWare, LLC Notable OS Features ● Notifications – Put icon in status bar (phones) or system bar (tablets) or elsewhere (TVs) – Optional hardware alerts ● Ringtone, vibration, etc. – Designed to let user know of work being done in the background
  • 23.   Copyright © 2013 CommonsWare, LLC Notable OS Features ● Multimedia – Audio, video ● Decent but not infinite roster of formats/codecs ● Some codecs are commercial, may not always be present – Recording, playback – Local, streaming
  • 24.   Copyright © 2013 CommonsWare, LLC Notable OS Features ● Locations – GPS – WiFi hotspot proximity – Cell tower triangulation ● Maps – Google Maps – Third-party mapping engines
  • 25.   Copyright © 2013 CommonsWare, LLC Notable OS Features ● Sensors – Accelerometer – Gyroscope – Orientation – Ambient Light – Barometric Pressure – Etc.
  • 26.   Copyright © 2013 CommonsWare, LLC Notable OS Features ● Other Hardware – Telephony – WiFi – Bluetooth – NFC – Cameras – USB
  • 27.   Copyright © 2013 CommonsWare, LLC Production ● APK File – Android “executable” – Digitally signed (self-signed certificate) – Freely distributable ● Not limited to Android Market or any other single venue
  • 28.   Copyright © 2013 CommonsWare, LLC Production ● Play Store – $25 setup fee – Upload and go ● Available on many devices within hours of release ● Other Markets Available – Example: Amazon Appstore for Android ● Self-Distribution
  • 29.   Copyright © 2013 CommonsWare, LLC But, What If I Hate Java?
  • 30.   Copyright © 2013 CommonsWare, LLC Varying Definitions of ”Native” ● Native = C/C++ – In comparison to Java ● Native = Java – In comparison to HTML5 and hybrid apps
  • 31.   Copyright © 2013 CommonsWare, LLC Native C/C++ Development ● Native Development Kit (NDK) – Allows you to write C/C++ libraries, link into your Android app ● Pros – Speed – Possible reuse across platforms
  • 32.   Copyright © 2013 CommonsWare, LLC Native C/C++ Development ● Cons – CPU architectures (x86 vs. ARM vs. MIPS) – May not like C/C++ any more than Java ● Pattern #1: Extension Library – Migrate select algorithms into native code – Examples: image processing, signal processing, game AI
  • 33.   Copyright © 2013 CommonsWare, LLC Native C/C++ Development ● Pattern #2: Complete App – Eschew all trappings of traditional apps – Mostly for OpenGL/OpenSL games
  • 34.   Copyright © 2013 CommonsWare, LLC HTML5 Web Apps ● TraditionalWeb development, writ small ● Key: Cache Manifest – Designate files that should be cached, beyond standard ephemeral cache – Objective: Allow app to be run offline ● Other Facets of HTML5 Specification – Storage,WebSockets, video, camera, location tracking, etc.
  • 35.   Copyright © 2013 CommonsWare, LLC HTML5 Web Apps ● Pros – May already haveWeb development talent – Cross-platform ● Cons – Need touch-aware coding/libraries – Discoverability an issue ● Play Store does not listWeb apps ● Amazon Appstore for Android does
  • 36.   Copyright © 2013 CommonsWare, LLC Hybrid Apps ● HTML5 UI on a (Java) Native Foundation – Package up HTML/CSS/JS/images into APK – Gives you access to APIs beyond HTML5 specs ● Most Popular: PhoneGap – Adobe product, based on Apache Cordova – Cross-platform – Optional hosted build service
  • 37.   Copyright © 2013 CommonsWare, LLC Hybrid Apps ● Pros – Closer to native apps for distribution and capability ● Cons – Not a native UI ● Big or small problem depending upon audience – Cannot do everything that a native app can
  • 38.   Copyright © 2013 CommonsWare, LLC Game Engines ● Android-Specific – AndEngine, Box2D ● Cross-Platform – Unity 3D, Cocos 2D, Corona, Havok, libGDX, Proton ● Dozens of others
  • 39.   Copyright © 2013 CommonsWare, LLC Other Cross-Platform Options ● Titanium Mobile – Develop in JavaScript, but manipulating native widgets (not HTML) ● Adobe AIR – Well, OK, sorta cross-platform... ● Xamarin – .NET for Android (MonoDroid)
  • 40.   Copyright © 2013 CommonsWare, LLC Other Cross-Platform Options ● Sencha – Offers own PhoneGap-style hybrid engine for use with SenchaTouch-based apps ● MoSync – Another take on hybrid app engine ● Rhodes – Web apps, but with Ruby “server”
  • 41.   Copyright © 2013 CommonsWare, LLC App Inventor ● Drag-and-Drop – UI – Code via pluggable “blocks” ● Originally created by Google educational unit ● Contributed to MIT Media Lab, open source ● Apps not really suited for distribution
  • 42.   Copyright © 2013 CommonsWare, LLC App Generators ● Canned “Fill-in-the-Blanks” Apps – You provide details, it generates custom app on a server for you to download and distribute ● Focuses – Specific verticals (e.g., restaurants) via vertical-specific templates – General “oh, we should have an app” firms
  • 43.   Copyright © 2013 CommonsWare, LLC OK, So How Do I Choose?
  • 44.   Copyright © 2013 CommonsWare, LLC Who IsThe User? ● Public Distribution? – UI/UX is fairly important for acceptance, good reviews – Should look like other apps of its ilk ● Internal Distribution? – Long history of crap – Look-and-feel issues tend to be lower concern
  • 45.   Copyright © 2013 CommonsWare, LLC What Does the User Use? ● Supplied Device? – If so, and if Android, all options on the table ● BYOD? – AndroidToday (think multi-native implementation) – AndroidTomorrow (think cross-platform) – Android Forever (gain deep experience in one area)
  • 46.   Copyright © 2013 CommonsWare, LLC What DoYou Need? ● More Device-Centric, More Native – Contacts? – Camera? – Background data syncing? – Notifications? ● Simpler Requirements = More Flexibility in Development Choice
  • 47.   Copyright © 2013 CommonsWare, LLC What DoYou Know? ● All Else Equal, Pick a Gentle Learning Curve – Unless learning is the objective... – ...and all else may not be equal ● Benefits to Existing Experience – Level of effort = time/expense budget – Deadlines