SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
Froyo to KitKat
Two Years Developing & Maintaining DeliRadio
by Andy Dyer
About Me
• Android & Rails developer at ChaiOne in Houston, Texas, USA
• Android apps on Google Play - DeliRadio, Music Library, and
Wrist Presenter
• Hobbies/Interests - Vinyl collector, coffee & beer snob, burger
aficionado
• Ich lerne Deutsch
About DeliRadio
• Explore local concert
calendars
• Stream stations based on
location or specific venues
• Share discoveries with
friends
• Receive notifications when
favorite artists play nearby
About DeliRadio - Navigation & Filters
About DeliRadio - Server Architecture
• Sinatra/Ruby API used by Android, iOS, and
third-party clients
• Virtual private cloud
• Web, database, and job servers
• Hosted on Amazon S3 & CloudFront CDN
• ElasticSearch & Redis for caching & high
performance search
Supported Android Versions Over Time
Early 2012
Min: Froyo
Max: Honeycomb
Mid 2012
Min: Froyo
Max: ICS
Early 2013
Min: Gingerbread
Max: Jelly Bean
Early 2014
Min: ICS
Max: KitKat
Topics
• Development Tools & Build Process
• Libraries Used
• Graphics & User Interface
• QA & Testing
Topics
• Development Tools & Build Process
• Libraries Used
• Graphics & User Interface
• QA & Testing
Development Tools (Early to Mid 2012)
Eclipse
• But which one?
• Build System: Ant
• Dependencies:
JAR files or
Maven (if you’re
patient)
Development Tools (Mid 2012 to Mid 2013)
Android Developer Tools (ADT) Bundle
• Android specific version of Eclipse
• Slightly more lightweight
Build Process - Eclipse & ADT
• Initial approach - File > Export, manually enter
keystore password, etc.
• Slightly better approach - Template based Ant
build
• Release & debug resources
• Custom Ant build targets with config specific
tokens
• Templates for manifest and other source files
Build Process - Eclipse & ADT
Problems with this approach
• Non-standard
• Templates must be be updated instead of
main files (i.e. manifest gets overwritten with
populated template on each build)
• Switching between release & debug must be
done via the command line. IDE just builds
current files.
Development Tools (Mid 2013 to Present)
Android Studio
• Gradle
• Maven dependencies - Similar to Ruby Gems
Build Process - Android Studio
Gradle
• Release & debug resources - automatically
merged during build process, no need for
templates
• Automated signing & version code
incrementing for release builds
• Automatic upload of test builds to Test Fairy
Gradle Build - Config-Specific Resources
android {
!
// ...
!
sourceSets {
debug {
manifest {
srcFile 'gradle/debug/AndroidManifest.xml'
}
res {
srcDir 'gradle/debug/res'
}
}
!
release {
manifest {
srcFile 'gradle/release/AndroidManifest.xml'
}
!
res {
srcDir 'gradle/release/res'
}
}
}
!
// ...
!
}
Gradle Build - Release Signing
android {
!
// ...
!
signingConfigs {
release {
storeFile file("../my_keystore.jks")
storePassword "$up3r$3cr3t"
keyAlias "my_key_alias"
keyPassword "$up3r$3cr3t"
}
}
!
buildTypes {
release {
signingConfig signingConfigs.release
}
}
!
// ...
!
}
Gradle Build - Version Code Increment
def versionMajor = 1
def versionMinor = 0
def versionPatch = 0
!
task('increaseVersionCode') << {
def manifestFile = file("src/main/AndroidManifest.xml")
def pattern = Pattern.compile("versionCode="(d+)"")
def manifestText = manifestFile.getText()
def matcher = pattern.matcher(manifestText)
matcher.find()
def versionCode = Integer.parseInt(matcher.group(1))
def manifestContent =
matcher.replaceAll("versionCode="" + ++versionCode + """)
manifestFile.write(manifestContent)
}
!
tasks.whenTaskAdded { task ->
if (task.name == 'generateReleaseBuildConfig') {
task.dependsOn 'increaseVersionCode'
}
}
Gradle Build - Version Code Increment
android {
!
// ...
!
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
}
!
// ...
!
}
Gradle Build - Test Fairy Upload
buildscript {
repositories {
mavenCentral()
maven { url 'https://www.testfairy.com/maven' }
}
!
dependencies {
classpath 'com.android.tools.build:gradle:0.10.+'
classpath 'com.testfairy.plugins.gradle:testfairy:1.+'
}
}
!
apply plugin: 'android'
apply plugin: 'testfairy'
!
android {
testfairyConfig {
apiKey "1234567890abcdef"
}
}
!
!
gradlew testfairyDebug
https://github.com/testfairy/testfairy-gradle-plugin
Topics
• Development Tools & Build Process
• Libraries Used
• Graphics & User Interface
• QA & Testing
Libraries Used - API (Early 2012 to Mid 2013)
• Apache HTTP Client - API requests
• Ignition Library - Caching & async image
loading
• GSON - JSON parsing
Libraries Used - API (Mid 2013 to Present)
• Volley - API requests & caching
Pro Tip:
compile 'com.mcxiaoke.volley:library-aar:1.0.+'
• Picasso - Async image loading
• GSON & Jackson - JSON parsing
• Apache HTTP Components - File uploads
Libraries Used - User Interface
• Smooth Progress Bar - Dashed progress bar
similar to Gmail, etc.
• Sticky List Headers
• View Pager Indicator
Libraries Used - User Interface
• Butter Knife - View Injection
!
!
@InjectView(R.id.profile_username) TextView username;
!
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.my_fragment, container, false);
ButterKnife.inject(this, view);
return view;
}
Libraries Used - Social Networks
• Facebook SDK
• Twitter4J
• Signpost - Twitter OAuth flow
Libraries Used - Miscellaneous
• Google Play Services - Battery friendly
location
• GreenDAO ORM - Much simpler than content
providers
• Otto - Event bus, pub/sub messaging between
components
• Crashlytics - Crash reporting & analysis
Topics
• Development Tools & Build Process
• Libraries Used
• Graphics & User Interface
• QA & Testing
Graphics & User Interface
• iOS design != Android design - But iOS 7
blurred the lines
• Retina images - XHDPI
• Non-Retina images - MDPI
• Icon font - Scalable icons that can be styled as
text
Graphics - Using an Icon Font
1. Use Font Awesome web font or your own font
for scalable, styleable icons
2. Map font characters in a strings resource file
3. Load font, apply to TextView or Button subclass
4. Set view text to desired character, style, etc.
5. Bask in the awesome
!
https://github.com/bperin/FontAwesomeAndroid
Graphics - Icon Font in Layouts
<com.FontAwesome.Example.TextAwesome
android:id="@+id/text_prost_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/fa_beer"
android:textSize="30sp" />
!
!
<com.FontAwesome.Example.ButtonAwesome
android:id="@+id/button_kaffee_icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fa_coffee" >
User Interface - Multiple Screen Sizes
• Use ActionBarCompat & Nine Old Androids if
supporting Gingerbread or lower
• Use RelativeLayout where possible to
dynamically position views
• Dimensions in dimens.xml files, different
values directories for various screen sizes
• Screen size specific layouts where necessary
Topics
• Development Tools & Build Process
• Libraries Used
• Graphics & User Interface
• QA & Testing
QA & Testing - Devices
• Too many to test them all
• Attempt to test a representative sample
• Major manufacturers - HTC/Motorola/
Samsung/Nexus
• After Gingerbread support dropped, OS version
& OEM customizations are much less of an
issue
QA Testing - Process
• Bugs & features entered in Pivotal Tracker
• Multiple builds delivered for testing each week
• Use Test Fairy test session videos to
troubleshoot device specific issues
• Full regression test of RC build before each
release
Vielen Dank!
K andydyer.org	
n @dammitandy
g plus.google.com/+AndrewDyer

Más contenido relacionado

La actualidad más candente

DevCon 2018 - 5 ways to use AWS with Alfresco
DevCon 2018 - 5 ways to use AWS with AlfrescoDevCon 2018 - 5 ways to use AWS with Alfresco
DevCon 2018 - 5 ways to use AWS with AlfrescoGavin Cornwell
 
Bridging the Gap - Laracon 2013
Bridging the Gap - Laracon 2013Bridging the Gap - Laracon 2013
Bridging the Gap - Laracon 2013Ben Corlett
 
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20CodeValue
 
How to Build a Better JIRA Add-on
How to Build a Better JIRA Add-onHow to Build a Better JIRA Add-on
How to Build a Better JIRA Add-onAtlassian
 
Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot Evan Lin
 
Aura Framework Overview
Aura Framework OverviewAura Framework Overview
Aura Framework Overviewrajdeep
 
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Martin Bergljung
 
What's New with Confluence Connect
What's New with Confluence ConnectWhat's New with Confluence Connect
What's New with Confluence ConnectAtlassian
 
ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018Mario Romano
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumTechday7
 
EclipseCon-Europe 2013: Making the Eclipse IDE fun again
EclipseCon-Europe 2013: Making the Eclipse IDE fun againEclipseCon-Europe 2013: Making the Eclipse IDE fun again
EclipseCon-Europe 2013: Making the Eclipse IDE fun againmartinlippert
 
Git and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshopGit and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshopBram Luyten
 
Scaling your Android App With Modularization
Scaling your Android App With ModularizationScaling your Android App With Modularization
Scaling your Android App With ModularizationBen Schwab
 
HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsSarah Sexton
 
Chromecast get started
Chromecast get startedChromecast get started
Chromecast get startedAscii Huang
 
Internet of things the salesforce lego machine cloud
Internet of things   the salesforce lego machine cloudInternet of things   the salesforce lego machine cloud
Internet of things the salesforce lego machine cloudandyinthecloud
 
Host Line Bot with Golang
Host Line Bot with GolangHost Line Bot with Golang
Host Line Bot with GolangEvan Lin
 
"Design First" APIs with Swagger
"Design First" APIs with Swagger"Design First" APIs with Swagger
"Design First" APIs with Swaggerscolestock
 
Eugene PHP June 2015 - Let's Talk Laravel
Eugene PHP June 2015 - Let's Talk LaravelEugene PHP June 2015 - Let's Talk Laravel
Eugene PHP June 2015 - Let's Talk Laravelanaxamaxan
 

La actualidad más candente (20)

DevCon 2018 - 5 ways to use AWS with Alfresco
DevCon 2018 - 5 ways to use AWS with AlfrescoDevCon 2018 - 5 ways to use AWS with Alfresco
DevCon 2018 - 5 ways to use AWS with Alfresco
 
Bridging the Gap - Laracon 2013
Bridging the Gap - Laracon 2013Bridging the Gap - Laracon 2013
Bridging the Gap - Laracon 2013
 
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
 
How to Build a Better JIRA Add-on
How to Build a Better JIRA Add-onHow to Build a Better JIRA Add-on
How to Build a Better JIRA Add-on
 
Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot
 
Aura Framework Overview
Aura Framework OverviewAura Framework Overview
Aura Framework Overview
 
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
 
What's New with Confluence Connect
What's New with Confluence ConnectWhat's New with Confluence Connect
What's New with Confluence Connect
 
ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
EclipseCon-Europe 2013: Making the Eclipse IDE fun again
EclipseCon-Europe 2013: Making the Eclipse IDE fun againEclipseCon-Europe 2013: Making the Eclipse IDE fun again
EclipseCon-Europe 2013: Making the Eclipse IDE fun again
 
Git and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshopGit and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshop
 
Scaling your Android App With Modularization
Scaling your Android App With ModularizationScaling your Android App With Modularization
Scaling your Android App With Modularization
 
HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOps
 
React Native Workshop
React Native WorkshopReact Native Workshop
React Native Workshop
 
Chromecast get started
Chromecast get startedChromecast get started
Chromecast get started
 
Internet of things the salesforce lego machine cloud
Internet of things   the salesforce lego machine cloudInternet of things   the salesforce lego machine cloud
Internet of things the salesforce lego machine cloud
 
Host Line Bot with Golang
Host Line Bot with GolangHost Line Bot with Golang
Host Line Bot with Golang
 
"Design First" APIs with Swagger
"Design First" APIs with Swagger"Design First" APIs with Swagger
"Design First" APIs with Swagger
 
Eugene PHP June 2015 - Let's Talk Laravel
Eugene PHP June 2015 - Let's Talk LaravelEugene PHP June 2015 - Let's Talk Laravel
Eugene PHP June 2015 - Let's Talk Laravel
 

Similar a Froyo to kit kat two years developing & maintaining deliradio

[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache CordovaIvano Malavolta
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms BootcampMike Melusky
 
Native Script Overview
Native Script OverviewNative Script Overview
Native Script OverviewBaskar rao Dsn
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Tom Johnson
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_uDoris Chen
 
2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar Slides2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar SlidesDuraSpace
 
Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Visug
 
Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMartinSotirov
 
Cordova: APIs and instruments
Cordova: APIs and instrumentsCordova: APIs and instruments
Cordova: APIs and instrumentsIvano Malavolta
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi Kedar
 
Freelancer Weapons of mass productivity
Freelancer Weapons of mass productivityFreelancer Weapons of mass productivity
Freelancer Weapons of mass productivityGregg Coppen
 
Sahi Principles and Architecture
Sahi Principles and ArchitectureSahi Principles and Architecture
Sahi Principles and ArchitectureTyto Software
 
Android Studio 3 - Dependency-Aware Build Variants and Product Flavors
Android Studio 3 - Dependency-Aware Build Variants and Product FlavorsAndroid Studio 3 - Dependency-Aware Build Variants and Product Flavors
Android Studio 3 - Dependency-Aware Build Variants and Product FlavorsStefan Martynkiw
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titaniumNaga Harish M
 
Native script overview
Native script overviewNative script overview
Native script overviewBaskar rao Dsn
 
Building your first android app using Xamarin
Building your first android app using XamarinBuilding your first android app using Xamarin
Building your first android app using XamarinGill Cleeren
 

Similar a Froyo to kit kat two years developing & maintaining deliradio (20)

Apache Cordova 4.x
Apache Cordova 4.xApache Cordova 4.x
Apache Cordova 4.x
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
 
Apache Cordova
Apache CordovaApache Cordova
Apache Cordova
 
Native Script Overview
Native Script OverviewNative Script Overview
Native Script Overview
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_u
 
2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar Slides2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar Slides
 
Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)
 
Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to Native
 
Cordova: APIs and instruments
Cordova: APIs and instrumentsCordova: APIs and instruments
Cordova: APIs and instruments
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
Freelancer Weapons of mass productivity
Freelancer Weapons of mass productivityFreelancer Weapons of mass productivity
Freelancer Weapons of mass productivity
 
Sahi Principles and Architecture
Sahi Principles and ArchitectureSahi Principles and Architecture
Sahi Principles and Architecture
 
Android Studio 3 - Dependency-Aware Build Variants and Product Flavors
Android Studio 3 - Dependency-Aware Build Variants and Product FlavorsAndroid Studio 3 - Dependency-Aware Build Variants and Product Flavors
Android Studio 3 - Dependency-Aware Build Variants and Product Flavors
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
Native script overview
Native script overviewNative script overview
Native script overview
 
Building your first android app using Xamarin
Building your first android app using XamarinBuilding your first android app using Xamarin
Building your first android app using Xamarin
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 

Más de Droidcon Berlin

Android programming -_pushing_the_limits
Android programming -_pushing_the_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limitsDroidcon Berlin
 
Android industrial mobility
Android industrial mobility Android industrial mobility
Android industrial mobility Droidcon Berlin
 
From sensor data_to_android_and_back
From sensor data_to_android_and_backFrom sensor data_to_android_and_back
From sensor data_to_android_and_backDroidcon Berlin
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86Droidcon Berlin
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building AndroidDroidcon Berlin
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentationDroidcon Berlin
 
Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Droidcon Berlin
 
The artofcalabash peterkrauss
The artofcalabash peterkraussThe artofcalabash peterkrauss
The artofcalabash peterkraussDroidcon Berlin
 
Raesch, gries droidcon 2014
Raesch, gries   droidcon 2014Raesch, gries   droidcon 2014
Raesch, gries droidcon 2014Droidcon Berlin
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Droidcon Berlin
 
20140508 quantified self droidcon
20140508 quantified self droidcon20140508 quantified self droidcon
20140508 quantified self droidconDroidcon Berlin
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devicesDroidcon Berlin
 
Droidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon Berlin
 
Droidcon2013 commercialsuccess rannenberg
Droidcon2013 commercialsuccess rannenbergDroidcon2013 commercialsuccess rannenberg
Droidcon2013 commercialsuccess rannenbergDroidcon Berlin
 
Droidcon2013 bootstrap luedeke
Droidcon2013 bootstrap luedekeDroidcon2013 bootstrap luedeke
Droidcon2013 bootstrap luedekeDroidcon Berlin
 
Droidcon2013 app analytics_huber_1und1
Droidcon2013  app analytics_huber_1und1Droidcon2013  app analytics_huber_1und1
Droidcon2013 app analytics_huber_1und1Droidcon Berlin
 

Más de Droidcon Berlin (20)

Android programming -_pushing_the_limits
Android programming -_pushing_the_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limits
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Android industrial mobility
Android industrial mobility Android industrial mobility
Android industrial mobility
 
Details matter in ux
Details matter in uxDetails matter in ux
Details matter in ux
 
From sensor data_to_android_and_back
From sensor data_to_android_and_backFrom sensor data_to_android_and_back
From sensor data_to_android_and_back
 
droidparts
droidpartsdroidparts
droidparts
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86
 
5 tips of monetization
5 tips of monetization5 tips of monetization
5 tips of monetization
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentation
 
Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3
 
The artofcalabash peterkrauss
The artofcalabash peterkraussThe artofcalabash peterkrauss
The artofcalabash peterkrauss
 
Raesch, gries droidcon 2014
Raesch, gries   droidcon 2014Raesch, gries   droidcon 2014
Raesch, gries droidcon 2014
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014
 
20140508 quantified self droidcon
20140508 quantified self droidcon20140508 quantified self droidcon
20140508 quantified self droidcon
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devices
 
Droidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicro
 
Droidcon2013 commercialsuccess rannenberg
Droidcon2013 commercialsuccess rannenbergDroidcon2013 commercialsuccess rannenberg
Droidcon2013 commercialsuccess rannenberg
 
Droidcon2013 bootstrap luedeke
Droidcon2013 bootstrap luedekeDroidcon2013 bootstrap luedeke
Droidcon2013 bootstrap luedeke
 
Droidcon2013 app analytics_huber_1und1
Droidcon2013  app analytics_huber_1und1Droidcon2013  app analytics_huber_1und1
Droidcon2013 app analytics_huber_1und1
 

Froyo to kit kat two years developing & maintaining deliradio

  • 1. Froyo to KitKat Two Years Developing & Maintaining DeliRadio by Andy Dyer
  • 2. About Me • Android & Rails developer at ChaiOne in Houston, Texas, USA • Android apps on Google Play - DeliRadio, Music Library, and Wrist Presenter • Hobbies/Interests - Vinyl collector, coffee & beer snob, burger aficionado • Ich lerne Deutsch
  • 3.
  • 4. About DeliRadio • Explore local concert calendars • Stream stations based on location or specific venues • Share discoveries with friends • Receive notifications when favorite artists play nearby
  • 5. About DeliRadio - Navigation & Filters
  • 6. About DeliRadio - Server Architecture • Sinatra/Ruby API used by Android, iOS, and third-party clients • Virtual private cloud • Web, database, and job servers • Hosted on Amazon S3 & CloudFront CDN • ElasticSearch & Redis for caching & high performance search
  • 7. Supported Android Versions Over Time Early 2012 Min: Froyo Max: Honeycomb Mid 2012 Min: Froyo Max: ICS Early 2013 Min: Gingerbread Max: Jelly Bean Early 2014 Min: ICS Max: KitKat
  • 8. Topics • Development Tools & Build Process • Libraries Used • Graphics & User Interface • QA & Testing
  • 9. Topics • Development Tools & Build Process • Libraries Used • Graphics & User Interface • QA & Testing
  • 10. Development Tools (Early to Mid 2012) Eclipse • But which one? • Build System: Ant • Dependencies: JAR files or Maven (if you’re patient)
  • 11. Development Tools (Mid 2012 to Mid 2013) Android Developer Tools (ADT) Bundle • Android specific version of Eclipse • Slightly more lightweight
  • 12. Build Process - Eclipse & ADT • Initial approach - File > Export, manually enter keystore password, etc. • Slightly better approach - Template based Ant build • Release & debug resources • Custom Ant build targets with config specific tokens • Templates for manifest and other source files
  • 13. Build Process - Eclipse & ADT Problems with this approach • Non-standard • Templates must be be updated instead of main files (i.e. manifest gets overwritten with populated template on each build) • Switching between release & debug must be done via the command line. IDE just builds current files.
  • 14. Development Tools (Mid 2013 to Present) Android Studio • Gradle • Maven dependencies - Similar to Ruby Gems
  • 15. Build Process - Android Studio Gradle • Release & debug resources - automatically merged during build process, no need for templates • Automated signing & version code incrementing for release builds • Automatic upload of test builds to Test Fairy
  • 16. Gradle Build - Config-Specific Resources android { ! // ... ! sourceSets { debug { manifest { srcFile 'gradle/debug/AndroidManifest.xml' } res { srcDir 'gradle/debug/res' } } ! release { manifest { srcFile 'gradle/release/AndroidManifest.xml' } ! res { srcDir 'gradle/release/res' } } } ! // ... ! }
  • 17. Gradle Build - Release Signing android { ! // ... ! signingConfigs { release { storeFile file("../my_keystore.jks") storePassword "$up3r$3cr3t" keyAlias "my_key_alias" keyPassword "$up3r$3cr3t" } } ! buildTypes { release { signingConfig signingConfigs.release } } ! // ... ! }
  • 18. Gradle Build - Version Code Increment def versionMajor = 1 def versionMinor = 0 def versionPatch = 0 ! task('increaseVersionCode') << { def manifestFile = file("src/main/AndroidManifest.xml") def pattern = Pattern.compile("versionCode="(d+)"") def manifestText = manifestFile.getText() def matcher = pattern.matcher(manifestText) matcher.find() def versionCode = Integer.parseInt(matcher.group(1)) def manifestContent = matcher.replaceAll("versionCode="" + ++versionCode + """) manifestFile.write(manifestContent) } ! tasks.whenTaskAdded { task -> if (task.name == 'generateReleaseBuildConfig') { task.dependsOn 'increaseVersionCode' } }
  • 19. Gradle Build - Version Code Increment android { ! // ... ! defaultConfig { minSdkVersion 14 targetSdkVersion 19 versionName "${versionMajor}.${versionMinor}.${versionPatch}" } ! // ... ! }
  • 20. Gradle Build - Test Fairy Upload buildscript { repositories { mavenCentral() maven { url 'https://www.testfairy.com/maven' } } ! dependencies { classpath 'com.android.tools.build:gradle:0.10.+' classpath 'com.testfairy.plugins.gradle:testfairy:1.+' } } ! apply plugin: 'android' apply plugin: 'testfairy' ! android { testfairyConfig { apiKey "1234567890abcdef" } } ! ! gradlew testfairyDebug https://github.com/testfairy/testfairy-gradle-plugin
  • 21. Topics • Development Tools & Build Process • Libraries Used • Graphics & User Interface • QA & Testing
  • 22. Libraries Used - API (Early 2012 to Mid 2013) • Apache HTTP Client - API requests • Ignition Library - Caching & async image loading • GSON - JSON parsing
  • 23. Libraries Used - API (Mid 2013 to Present) • Volley - API requests & caching Pro Tip: compile 'com.mcxiaoke.volley:library-aar:1.0.+' • Picasso - Async image loading • GSON & Jackson - JSON parsing • Apache HTTP Components - File uploads
  • 24. Libraries Used - User Interface • Smooth Progress Bar - Dashed progress bar similar to Gmail, etc. • Sticky List Headers • View Pager Indicator
  • 25. Libraries Used - User Interface • Butter Knife - View Injection ! ! @InjectView(R.id.profile_username) TextView username; ! @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.my_fragment, container, false); ButterKnife.inject(this, view); return view; }
  • 26. Libraries Used - Social Networks • Facebook SDK • Twitter4J • Signpost - Twitter OAuth flow
  • 27. Libraries Used - Miscellaneous • Google Play Services - Battery friendly location • GreenDAO ORM - Much simpler than content providers • Otto - Event bus, pub/sub messaging between components • Crashlytics - Crash reporting & analysis
  • 28. Topics • Development Tools & Build Process • Libraries Used • Graphics & User Interface • QA & Testing
  • 29. Graphics & User Interface • iOS design != Android design - But iOS 7 blurred the lines • Retina images - XHDPI • Non-Retina images - MDPI • Icon font - Scalable icons that can be styled as text
  • 30.
  • 31.
  • 32. Graphics - Using an Icon Font 1. Use Font Awesome web font or your own font for scalable, styleable icons 2. Map font characters in a strings resource file 3. Load font, apply to TextView or Button subclass 4. Set view text to desired character, style, etc. 5. Bask in the awesome ! https://github.com/bperin/FontAwesomeAndroid
  • 33. Graphics - Icon Font in Layouts <com.FontAwesome.Example.TextAwesome android:id="@+id/text_prost_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/fa_beer" android:textSize="30sp" /> ! ! <com.FontAwesome.Example.ButtonAwesome android:id="@+id/button_kaffee_icon" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/fa_coffee" >
  • 34.
  • 35. User Interface - Multiple Screen Sizes • Use ActionBarCompat & Nine Old Androids if supporting Gingerbread or lower • Use RelativeLayout where possible to dynamically position views • Dimensions in dimens.xml files, different values directories for various screen sizes • Screen size specific layouts where necessary
  • 36. Topics • Development Tools & Build Process • Libraries Used • Graphics & User Interface • QA & Testing
  • 37. QA & Testing - Devices • Too many to test them all • Attempt to test a representative sample • Major manufacturers - HTC/Motorola/ Samsung/Nexus • After Gingerbread support dropped, OS version & OEM customizations are much less of an issue
  • 38. QA Testing - Process • Bugs & features entered in Pivotal Tracker • Multiple builds delivered for testing each week • Use Test Fairy test session videos to troubleshoot device specific issues • Full regression test of RC build before each release
  • 39. Vielen Dank! K andydyer.org n @dammitandy g plus.google.com/+AndrewDyer