SlideShare a Scribd company logo
Android Lessons You
Won’t Learn in School
   Michael Galpin, Bump Technologies
About Me
•   Apps

    •   Bump, eBay Mobile

•   Android in Practice

•   Social

    •   @michaelg

    •   +Michael Galpin
Agenda
•   Architecture, now and
    then

•   Security

•   Misc

    •   Logging

    •   Hybrids

    •   SDKs

    •   Testing
Architecture?
You have it
    ... even if you’ve never
         thought about it


 So maybe you should think
         about it.
Android lessons you won't learn in school
The
Cloud
The
Cloud
The
         Cloud




•Transport
The
         Cloud




•Transport
•Format
HTTP

• Apache HTTP Client
 • DefaultHttpClient
 • AndroidHttpClient
• HttpURLConnection
 • java.net.URL
HTTP

• Apache HTTP Client
 • DefaultHttpClient
 • AndroidHttpClient
• HttpURLConnection
 • java.net.URL
HTTP

• Apache HTTP Client
 • DefaultHttpClient
 • AndroidHttpClient
• HttpURLConnection
 • java.net.URL
Format




XML            JSON
XML

• SAX
 • android.sax
• DOM
• XmlPullParser
JS
  O
   N
      !
Don’t forget to zip
New World Architecture
Android lessons you won't learn in school
Sockets

• TCP
 • WebSockets
• UDP
No blocking allowed

• Netty, Mina (Java)
• Twisted, Diesel (Python)
• EventMachine (Ruby)
• Node.js (JavaScript)
• Nitrogen (Erlang)
Harder, Better, Faster, Stronger
Optimized Formats

• Protocol Buffers
• Thrift
• MessagePack
• Fast Infoset
• BSON
Android lessons you won't learn in school
The Web Model

• Login page (HTTPS)
• HTTP Cookie
 • Expiry
Mobile Logins
Logging In

• Full Native
 • Requires “Login API”



                          User Experience
• Embedded Web Browser




                                            Security
 • “OAuth”
• External Web Browser
Tokens

• Obtained from API or OAuth flow
 • Equivalent to username + password
• Storage
• Expiry
Defending Your Servers

• Need per-user throttles
 • Can’t count on IP addresses
• Expect many legit login failures
• Anything your client can do, evil clients can
  do too
Logging
What to log

• User Actions
 • Key to A/B Testing
• Crashes & Exceptions
Logging User Actions

• Log a lot ... but don’t saturate your
  network connection
• Batch logs together
 • But don’t block UI thread
• Send when the user’s not busy
Crash Logs

• Create your own         UncaughtExceptionHandler

 •   Thread.setDefaultUncaughtExceptionHandler


 • Log crash on...
  • next app launch
  • from background Service
Even More Crash Logs


Process process =
    Runtime.getRuntime().exec(String.format("logcat -t %d", 100));
InputStream stream = process.getInputStream();




<uses-permission android:name="android.permission.READ_LOGS" />
Android lessons you won't learn in school
Android lessons you won't learn in school
Android Hybrids
       App



                              Web Page

                         Interface


Easy to expose “native” features to JS
Calling JS from native code, more hacky
WebView webView = (WebView) findViewById(R.id.web_view);

WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true);
settings.setDatabasePath("/data/data/my.package/folder");

webView.setWebChromeClient(new WebChromeClient(){

      @Override
      public boolean onConsoleMessage(ConsoleMessage msg){
          // pipe this to LogCat
      }
});

webView.addJavascriptInterface(new MyInterface(), "zorro");

webView.loadUrl("javascript:tarzan.start()");
Android lessons you won't learn in school
Why hybrid
• Specialized scenarios (OAuth)
• Server driven UI
 • Testing, experimentation
• Leverage web development skills
• Cross platforms?
 • UX <===> $$$
Mobile SDK




If you build it, they will come?
Public Web Services
         (APIs)
• Derive value from 3rd party access
• Legacy services
 • Designed for servers and PCs
• Lower barrier of use
 • Enforce usage patterns / security
An SDK should...
• Provide local APIs to:
 • Handle network communication
 • Handle serialization of requests
 • Handle deserialization of responses
 • Deal with security
 • Provide useful errors
The Java™ Way
• Generate code (bindings) for requests,
  responses, error objects
• Provide runtime library for serialization/
  deserialization
• Lots of code and lots of methods!
 • Larger APKs
 • 65536 methods allowed / dex file
Testing
FAQs

• Which devices?
• How many devices?
• How do you get access to devices?
I tested the app on my phone




             ...while eating a pound of bacon.
Numbers Game




*Maybe consider: Carriers (CDMA/GSM)
How to get devices

• Buy!
 • Don’t forget international
• Device labs
• “Mechanical turk” services
Questions?

More Related Content

What's hot

JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
Chris Love
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With Jest
Ben McCormick
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
Jason Casden
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Matt Raible
 
Android testing-with-selenium-webdriver Online Training
Android testing-with-selenium-webdriver Online TrainingAndroid testing-with-selenium-webdriver Online Training
Android testing-with-selenium-webdriver Online Training
Nagendra Kumar
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
Alexandru Badiu
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
Valeri Karpov
 
Building rest services using aspnetwebapi
Building rest services using aspnetwebapiBuilding rest services using aspnetwebapi
Building rest services using aspnetwebapi
Brij Mishra
 
Creating RESTful API’s with Grails and Spring Security
Creating RESTful API’s with Grails and Spring SecurityCreating RESTful API’s with Grails and Spring Security
Creating RESTful API’s with Grails and Spring Security
Alvaro Sanchez-Mariscal
 
Testing Single Page Webapp
Testing Single Page WebappTesting Single Page Webapp
Testing Single Page Webapp
Akshay Mathur
 
An Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionAn Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI Composition
Dr. Arif Wider
 
The Art of Angular in 2016 - Devoxx France 2016
The Art of Angular in 2016 - Devoxx France 2016The Art of Angular in 2016 - Devoxx France 2016
The Art of Angular in 2016 - Devoxx France 2016
Matt Raible
 
Jumpstart: Introduction to Atlas, Highlighting Enterprise Features
Jumpstart: Introduction to Atlas, Highlighting Enterprise FeaturesJumpstart: Introduction to Atlas, Highlighting Enterprise Features
Jumpstart: Introduction to Atlas, Highlighting Enterprise Features
MongoDB
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak
 
Build A Killer Client For Your REST+JSON API
Build A Killer Client For Your REST+JSON APIBuild A Killer Client For Your REST+JSON API
Build A Killer Client For Your REST+JSON API
Stormpath
 
Ajax presentation
Ajax presentationAjax presentation
Selenium bootcamp slides
Selenium bootcamp slides   Selenium bootcamp slides
Selenium bootcamp slides
seleniumbootcamp
 
Dzhengis 93098 ajax - security
Dzhengis 93098   ajax - securityDzhengis 93098   ajax - security
Dzhengis 93098 ajax - security
dzhengo44
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS Debugging
Rami Sayar
 

What's hot (19)

JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With Jest
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
 
Android testing-with-selenium-webdriver Online Training
Android testing-with-selenium-webdriver Online TrainingAndroid testing-with-selenium-webdriver Online Training
Android testing-with-selenium-webdriver Online Training
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
 
Building rest services using aspnetwebapi
Building rest services using aspnetwebapiBuilding rest services using aspnetwebapi
Building rest services using aspnetwebapi
 
Creating RESTful API’s with Grails and Spring Security
Creating RESTful API’s with Grails and Spring SecurityCreating RESTful API’s with Grails and Spring Security
Creating RESTful API’s with Grails and Spring Security
 
Testing Single Page Webapp
Testing Single Page WebappTesting Single Page Webapp
Testing Single Page Webapp
 
An Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionAn Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI Composition
 
The Art of Angular in 2016 - Devoxx France 2016
The Art of Angular in 2016 - Devoxx France 2016The Art of Angular in 2016 - Devoxx France 2016
The Art of Angular in 2016 - Devoxx France 2016
 
Jumpstart: Introduction to Atlas, Highlighting Enterprise Features
Jumpstart: Introduction to Atlas, Highlighting Enterprise FeaturesJumpstart: Introduction to Atlas, Highlighting Enterprise Features
Jumpstart: Introduction to Atlas, Highlighting Enterprise Features
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
 
Build A Killer Client For Your REST+JSON API
Build A Killer Client For Your REST+JSON APIBuild A Killer Client For Your REST+JSON API
Build A Killer Client For Your REST+JSON API
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 
Selenium bootcamp slides
Selenium bootcamp slides   Selenium bootcamp slides
Selenium bootcamp slides
 
Dzhengis 93098 ajax - security
Dzhengis 93098   ajax - securityDzhengis 93098   ajax - security
Dzhengis 93098 ajax - security
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS Debugging
 

Viewers also liked

10 gigabit ethernet technology
10 gigabit ethernet technology10 gigabit ethernet technology
10 gigabit ethernet technology
Sajan Sahu
 
Optical fiber communication presentation
Optical fiber communication presentationOptical fiber communication presentation
Optical fiber communication presentation
palme mawagali
 
Seminar report of optical ethernet
Seminar report of optical ethernetSeminar report of optical ethernet
Seminar report of optical ethernet
Mohammad Waziruddin
 
Ethernet technology
Ethernet technologyEthernet technology
Ethernet technology
Josekutty James
 
Ethernet
EthernetEthernet
Ethernet
Mihika Shah
 
Gi fi seminar Report
Gi fi seminar ReportGi fi seminar Report
Gi fi seminar Report
Shivam Joshi
 
3D PRINTER Seminar fair report (pdf)
3D PRINTER Seminar fair report (pdf)3D PRINTER Seminar fair report (pdf)
3D PRINTER Seminar fair report (pdf)
Arjun Raveendran
 
Zehirleme
ZehirlemeZehirleme
Zehirleme
Jetaime61
 
Generazione 1000 €
Generazione 1000 €Generazione 1000 €
Generazione 1000 €
Suni Martï
 
Injoos corporate presentation webinar oct 2009 ver1
Injoos corporate presentation webinar   oct 2009 ver1Injoos corporate presentation webinar   oct 2009 ver1
Injoos corporate presentation webinar oct 2009 ver1
Injoos
 
Humour Et Insolites
Humour Et InsolitesHumour Et Insolites
Humour Et Insolites
guestfa3180
 
JISC Greening ICT Keynote Presentation
JISC Greening ICT Keynote PresentationJISC Greening ICT Keynote Presentation
JISC Greening ICT Keynote Presentation
Joss Winn
 
PROJEKT KOSMOS
PROJEKT  KOSMOSPROJEKT  KOSMOS
PROJEKT KOSMOS
wega
 
Kkka Korunma
Kkka KorunmaKkka Korunma
Kkka Korunma
anttab
 
Political Cartooningtoputonblog
Political CartooningtoputonblogPolitical Cartooningtoputonblog
Political Cartooningtoputonblog
ab08028
 
The Future of Big Data in Education
The Future of Big Data in EducationThe Future of Big Data in Education
The Future of Big Data in Education
Hendrik Drachsler
 
Sunrise Question
Sunrise QuestionSunrise Question
Sunrise Question
sixteen.wiishes
 
Communities of Learning in Organizational Training: The influence of particip...
Communities of Learning in Organizational Training: The influence of particip...Communities of Learning in Organizational Training: The influence of particip...
Communities of Learning in Organizational Training: The influence of particip...
Martin Rehm
 

Viewers also liked (20)

10 gigabit ethernet technology
10 gigabit ethernet technology10 gigabit ethernet technology
10 gigabit ethernet technology
 
Optical fiber communication presentation
Optical fiber communication presentationOptical fiber communication presentation
Optical fiber communication presentation
 
Seminar report of optical ethernet
Seminar report of optical ethernetSeminar report of optical ethernet
Seminar report of optical ethernet
 
BUMP
BUMPBUMP
BUMP
 
Ethernet technology
Ethernet technologyEthernet technology
Ethernet technology
 
Ethernet
EthernetEthernet
Ethernet
 
Gi fi seminar Report
Gi fi seminar ReportGi fi seminar Report
Gi fi seminar Report
 
3D PRINTER Seminar fair report (pdf)
3D PRINTER Seminar fair report (pdf)3D PRINTER Seminar fair report (pdf)
3D PRINTER Seminar fair report (pdf)
 
Zehirleme
ZehirlemeZehirleme
Zehirleme
 
Generazione 1000 €
Generazione 1000 €Generazione 1000 €
Generazione 1000 €
 
Injoos corporate presentation webinar oct 2009 ver1
Injoos corporate presentation webinar   oct 2009 ver1Injoos corporate presentation webinar   oct 2009 ver1
Injoos corporate presentation webinar oct 2009 ver1
 
PresentacióN
PresentacióNPresentacióN
PresentacióN
 
Humour Et Insolites
Humour Et InsolitesHumour Et Insolites
Humour Et Insolites
 
JISC Greening ICT Keynote Presentation
JISC Greening ICT Keynote PresentationJISC Greening ICT Keynote Presentation
JISC Greening ICT Keynote Presentation
 
PROJEKT KOSMOS
PROJEKT  KOSMOSPROJEKT  KOSMOS
PROJEKT KOSMOS
 
Kkka Korunma
Kkka KorunmaKkka Korunma
Kkka Korunma
 
Political Cartooningtoputonblog
Political CartooningtoputonblogPolitical Cartooningtoputonblog
Political Cartooningtoputonblog
 
The Future of Big Data in Education
The Future of Big Data in EducationThe Future of Big Data in Education
The Future of Big Data in Education
 
Sunrise Question
Sunrise QuestionSunrise Question
Sunrise Question
 
Communities of Learning in Organizational Training: The influence of particip...
Communities of Learning in Organizational Training: The influence of particip...Communities of Learning in Organizational Training: The influence of particip...
Communities of Learning in Organizational Training: The influence of particip...
 

Similar to Android lessons you won't learn in school

20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
Richard Rodger
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1)
Volkan Özçelik
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
Volkan Özçelik
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
Volkan Özçelik
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
David M. Johnson
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
Kevin Decker
 
Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)
Igalia
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
Ganesh Kondal
 
The Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devicesThe Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devices
Wesley Hales
 
Hacking mobile apps
Hacking mobile appsHacking mobile apps
Hacking mobile apps
kunwaratul hax0r
 
Do you lose sleep at night?
Do you lose sleep at night?Do you lose sleep at night?
Do you lose sleep at night?
Nathan Van Gheem
 
Rhodes
RhodesRhodes
Rhodes
jwallace41
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
Avi Kedar
 
Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"
Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"
Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"
Andi Rustandi Djunaedi
 
初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料
Shinichi Ogawa
 
Design for scale
Design for scaleDesign for scale
Design for scale
Doug Lampe
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
Roy Clarkson
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applications
Chris Love
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
DevelopmentArc LLC
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the future
Chris Mills
 

Similar to Android lessons you won't learn in school (20)

20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1)
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
 
Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
 
The Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devicesThe Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devices
 
Hacking mobile apps
Hacking mobile appsHacking mobile apps
Hacking mobile apps
 
Do you lose sleep at night?
Do you lose sleep at night?Do you lose sleep at night?
Do you lose sleep at night?
 
Rhodes
RhodesRhodes
Rhodes
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"
Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"
Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"
 
初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料
 
Design for scale
Design for scaleDesign for scale
Design for scale
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applications
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the future
 

More from Michael Galpin

Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and Smartphones
Michael Galpin
 
Android workshop
Android workshopAndroid workshop
Android workshop
Michael Galpin
 
Scala on Android: Experiences at Bump Technologies
Scala on Android: Experiences at Bump TechnologiesScala on Android: Experiences at Bump Technologies
Scala on Android: Experiences at Bump Technologies
Michael Galpin
 
That’s My App - Running in Your Background - Draining Your Battery
That’s My App - Running in Your Background - Draining Your BatteryThat’s My App - Running in Your Background - Draining Your Battery
That’s My App - Running in Your Background - Draining Your Battery
Michael Galpin
 
Mobile Web 5.0
Mobile Web 5.0Mobile Web 5.0
Mobile Web 5.0
Michael Galpin
 
Persistent Data Structures And Managed References
Persistent Data Structures And Managed ReferencesPersistent Data Structures And Managed References
Persistent Data Structures And Managed References
Michael Galpin
 
Scala on Your Phone
Scala on Your PhoneScala on Your Phone
Scala on Your Phone
Michael Galpin
 
Mobile Development 101
Mobile Development 101Mobile Development 101
Mobile Development 101
Michael Galpin
 
RIAs Done Right: Grails, Flex, and EXT GWT
RIAs Done Right: Grails, Flex, and EXT GWTRIAs Done Right: Grails, Flex, and EXT GWT
RIAs Done Right: Grails, Flex, and EXT GWT
Michael Galpin
 
Eclipse @eBay 2009
Eclipse @eBay 2009Eclipse @eBay 2009
Eclipse @eBay 2009
Michael Galpin
 
Introduction to Scala for Java Developers
Introduction to Scala for Java DevelopersIntroduction to Scala for Java Developers
Introduction to Scala for Java Developers
Michael Galpin
 
Eclipse@eBay
Eclipse@eBayEclipse@eBay
Eclipse@eBay
Michael Galpin
 

More from Michael Galpin (12)

Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and Smartphones
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
Scala on Android: Experiences at Bump Technologies
Scala on Android: Experiences at Bump TechnologiesScala on Android: Experiences at Bump Technologies
Scala on Android: Experiences at Bump Technologies
 
That’s My App - Running in Your Background - Draining Your Battery
That’s My App - Running in Your Background - Draining Your BatteryThat’s My App - Running in Your Background - Draining Your Battery
That’s My App - Running in Your Background - Draining Your Battery
 
Mobile Web 5.0
Mobile Web 5.0Mobile Web 5.0
Mobile Web 5.0
 
Persistent Data Structures And Managed References
Persistent Data Structures And Managed ReferencesPersistent Data Structures And Managed References
Persistent Data Structures And Managed References
 
Scala on Your Phone
Scala on Your PhoneScala on Your Phone
Scala on Your Phone
 
Mobile Development 101
Mobile Development 101Mobile Development 101
Mobile Development 101
 
RIAs Done Right: Grails, Flex, and EXT GWT
RIAs Done Right: Grails, Flex, and EXT GWTRIAs Done Right: Grails, Flex, and EXT GWT
RIAs Done Right: Grails, Flex, and EXT GWT
 
Eclipse @eBay 2009
Eclipse @eBay 2009Eclipse @eBay 2009
Eclipse @eBay 2009
 
Introduction to Scala for Java Developers
Introduction to Scala for Java DevelopersIntroduction to Scala for Java Developers
Introduction to Scala for Java Developers
 
Eclipse@eBay
Eclipse@eBayEclipse@eBay
Eclipse@eBay
 

Recently uploaded

CiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.pptCiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.ppt
moinahousna
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
ldtexsolbl
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
313mohammedarshad
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
Shiv Technolabs
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
maigasapphire
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Torry Harris
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
Steven Carlson
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 
Pigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending PlantPigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending Plant
LINUS PROJECTS (INDIA)
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
aslasdfmkhan4750
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
The importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT StandardizationThe importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT Standardization
Axel Rennoch
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
Matthias Neugebauer
 
Figma AI Design Generator_ In-Depth Review.pdf
Figma AI Design Generator_ In-Depth Review.pdfFigma AI Design Generator_ In-Depth Review.pdf
Figma AI Design Generator_ In-Depth Review.pdf
Management Institute of Skills Development
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
shanihomely
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
bhumivarma35300
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Muhammad Ali
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
aakash malhotra
 

Recently uploaded (20)

CiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.pptCiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.ppt
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 
Pigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending PlantPigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending Plant
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
The importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT StandardizationThe importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT Standardization
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
 
Figma AI Design Generator_ In-Depth Review.pdf
Figma AI Design Generator_ In-Depth Review.pdfFigma AI Design Generator_ In-Depth Review.pdf
Figma AI Design Generator_ In-Depth Review.pdf
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
 

Android lessons you won't learn in school

  • 1. Android Lessons You Won’t Learn in School Michael Galpin, Bump Technologies
  • 2. About Me • Apps • Bump, eBay Mobile • Android in Practice • Social • @michaelg • +Michael Galpin
  • 3. Agenda • Architecture, now and then • Security • Misc • Logging • Hybrids • SDKs • Testing
  • 4. Architecture? You have it ... even if you’ve never thought about it So maybe you should think about it.
  • 8. The Cloud •Transport
  • 9. The Cloud •Transport •Format
  • 10. HTTP • Apache HTTP Client • DefaultHttpClient • AndroidHttpClient • HttpURLConnection • java.net.URL
  • 11. HTTP • Apache HTTP Client • DefaultHttpClient • AndroidHttpClient • HttpURLConnection • java.net.URL
  • 12. HTTP • Apache HTTP Client • DefaultHttpClient • AndroidHttpClient • HttpURLConnection • java.net.URL
  • 13. Format XML JSON
  • 14. XML • SAX • android.sax • DOM • XmlPullParser
  • 15. JS O N !
  • 19. Sockets • TCP • WebSockets • UDP
  • 20. No blocking allowed • Netty, Mina (Java) • Twisted, Diesel (Python) • EventMachine (Ruby) • Node.js (JavaScript) • Nitrogen (Erlang)
  • 22. Optimized Formats • Protocol Buffers • Thrift • MessagePack • Fast Infoset • BSON
  • 24. The Web Model • Login page (HTTPS) • HTTP Cookie • Expiry
  • 26. Logging In • Full Native • Requires “Login API” User Experience • Embedded Web Browser Security • “OAuth” • External Web Browser
  • 27. Tokens • Obtained from API or OAuth flow • Equivalent to username + password • Storage • Expiry
  • 28. Defending Your Servers • Need per-user throttles • Can’t count on IP addresses • Expect many legit login failures • Anything your client can do, evil clients can do too
  • 30. What to log • User Actions • Key to A/B Testing • Crashes & Exceptions
  • 31. Logging User Actions • Log a lot ... but don’t saturate your network connection • Batch logs together • But don’t block UI thread • Send when the user’s not busy
  • 32. Crash Logs • Create your own UncaughtExceptionHandler • Thread.setDefaultUncaughtExceptionHandler • Log crash on... • next app launch • from background Service
  • 33. Even More Crash Logs Process process = Runtime.getRuntime().exec(String.format("logcat -t %d", 100)); InputStream stream = process.getInputStream(); <uses-permission android:name="android.permission.READ_LOGS" />
  • 36. Android Hybrids App Web Page Interface Easy to expose “native” features to JS Calling JS from native code, more hacky
  • 37. WebView webView = (WebView) findViewById(R.id.web_view); WebSettings settings = webView.getSettings(); settings.setJavaScriptEnabled(true); settings.setDomStorageEnabled(true); settings.setDatabasePath("/data/data/my.package/folder"); webView.setWebChromeClient(new WebChromeClient(){ @Override public boolean onConsoleMessage(ConsoleMessage msg){ // pipe this to LogCat } }); webView.addJavascriptInterface(new MyInterface(), "zorro"); webView.loadUrl("javascript:tarzan.start()");
  • 39. Why hybrid • Specialized scenarios (OAuth) • Server driven UI • Testing, experimentation • Leverage web development skills • Cross platforms? • UX <===> $$$
  • 40. Mobile SDK If you build it, they will come?
  • 41. Public Web Services (APIs) • Derive value from 3rd party access • Legacy services • Designed for servers and PCs • Lower barrier of use • Enforce usage patterns / security
  • 42. An SDK should... • Provide local APIs to: • Handle network communication • Handle serialization of requests • Handle deserialization of responses • Deal with security • Provide useful errors
  • 43. The Java™ Way • Generate code (bindings) for requests, responses, error objects • Provide runtime library for serialization/ deserialization • Lots of code and lots of methods! • Larger APKs • 65536 methods allowed / dex file
  • 45. FAQs • Which devices? • How many devices? • How do you get access to devices?
  • 46. I tested the app on my phone ...while eating a pound of bacon.
  • 47. Numbers Game *Maybe consider: Carriers (CDMA/GSM)
  • 48. How to get devices • Buy! • Don’t forget international • Device labs • “Mechanical turk” services

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. MG\n
  45. \n
  46. \n
  47. \n