SlideShare ist ein Scribd-Unternehmen logo
1 von 49
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.
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
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
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 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()");
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?

Weitere ähnliche Inhalte

Was ist angesagt?

JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizationsChris Love
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With JestBen McCormick
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and meJason 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 2016Matt 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 TrainingNagendra Kumar
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhoneAlexandru 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 MongoDBValeri Karpov
 
Building rest services using aspnetwebapi
Building rest services using aspnetwebapiBuilding rest services using aspnetwebapi
Building rest services using aspnetwebapiBrij 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 SecurityAlvaro Sanchez-Mariscal
 
Testing Single Page Webapp
Testing Single Page WebappTesting Single Page Webapp
Testing Single Page WebappAkshay 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 CompositionDr. 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 2016Matt 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 FeaturesMongoDB
 
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 APIStormpath
 
Dzhengis 93098 ajax - security
Dzhengis 93098   ajax - securityDzhengis 93098   ajax - security
Dzhengis 93098 ajax - securitydzhengo44
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS DebuggingRami Sayar
 

Was ist angesagt? (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
 

Andere mochten auch

10 gigabit ethernet technology
10 gigabit ethernet technology10 gigabit ethernet technology
10 gigabit ethernet technologySajan Sahu
 
Optical fiber communication presentation
Optical fiber communication presentationOptical fiber communication presentation
Optical fiber communication presentationpalme mawagali
 
Seminar report of optical ethernet
Seminar report of optical ethernetSeminar report of optical ethernet
Seminar report of optical ethernetMohammad Waziruddin
 
Gi fi seminar Report
Gi fi seminar ReportGi fi seminar Report
Gi fi seminar ReportShivam 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
 
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 ver1Injoos
 
Humour Et Insolites
Humour Et InsolitesHumour Et Insolites
Humour Et Insolitesguestfa3180
 
JISC Greening ICT Keynote Presentation
JISC Greening ICT Keynote PresentationJISC Greening ICT Keynote Presentation
JISC Greening ICT Keynote PresentationJoss Winn
 
PROJEKT KOSMOS
PROJEKT  KOSMOSPROJEKT  KOSMOS
PROJEKT KOSMOSwega
 
Kkka Korunma
Kkka KorunmaKkka Korunma
Kkka Korunmaanttab
 
Political Cartooningtoputonblog
Political CartooningtoputonblogPolitical Cartooningtoputonblog
Political Cartooningtoputonblogab08028
 
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 EducationHendrik Drachsler
 
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
 

Andere mochten auch (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...
 

Ähnlich wie Android Lessons You Won’t Learn in School

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 PracticesVolkan Özçelik
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Volkan Özçelik
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache UsergridDavid M. Johnson
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOSKevin 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.5Ganesh 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 devicesWesley Hales
 
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
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi 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 scaleDoug Lampe
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5Roy 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 applicationsChris Love
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the futureChris Mills
 

Ähnlich wie 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
 

Mehr von Michael Galpin

Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesMichael 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 TechnologiesMichael 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 BatteryMichael Galpin
 
Persistent Data Structures And Managed References
Persistent Data Structures And Managed ReferencesPersistent Data Structures And Managed References
Persistent Data Structures And Managed ReferencesMichael Galpin
 
Mobile Development 101
Mobile Development 101Mobile Development 101
Mobile Development 101Michael 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 GWTMichael Galpin
 
Introduction to Scala for Java Developers
Introduction to Scala for Java DevelopersIntroduction to Scala for Java Developers
Introduction to Scala for Java DevelopersMichael Galpin
 

Mehr von 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
 

Kürzlich hochgeladen

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 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.
  • 5.
  • 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 !
  • 18.
  • 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
  • 23.
  • 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" />
  • 34.
  • 35.
  • 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()");
  • 38.
  • 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

Hinweis der Redaktion

  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