Fragmented - An Android Developer Podcast

The Fragmented Podcast is a podcast for Android Developers hosted by Donn Felker and Kaushik Gopal. Our goal is to help you become a better Android Developer. We chat about topics such as Testing, Dependency Injection, Patterns and Practices, useful libraries, and much more. We will also be interviewing some of the top developers out there. Subscribe now and join us on the journey of becoming a better Android Developer.

http://www.fragmentedpodcast.com

subscribe
share






episode 5: 005: Image libraries for Android


In this episode of Fragmented, Donn and Kaushik start off by discussing the tips and tricks available for efficiently loading images in an Android app. Good image libraries make use of these techniques and perform all the heavy lifting in the background. So they then discuss the different image library options available for Android developers.

Show Notes Techniques/tips on effective image rendering in Android: Bitmap sizes and allocation:
  • Displaying bitmaps efficiently [developer.android.com]
  • RGB_565, ARGB_888 and other different bitmap configurations[developer.android.com]
  • Android Camera2 apis [developer.android.com]
  • Chet Haase DevByte : Bitmap allocation [youtube.com] (bitmaps managed in Dalvik heap post 3.0; so large bitmaps implies large heap implies GC could happen more often)
Reuse bitmaps:
  • inBitmap option for Android 3.0 and later [developer.android.com]
  • before Android 4.4 only equal sized bitmaps with inSampleSize 1 supported[developer.android.com]
  • Reusing bitmap objects on Android[booking.com]
Downsample bitmaps
  • Load a scaled down version into memory [developer.android.com]
    • see code for calculateInSampleSize
Caching
  • Cache Algorithms - see LruCache [wikipedia.org]
  • LruCache object in Android [developer.android.com]
  • JakeWharton DiskLruCache [github.com]
  • Don’t use Soft or Weak References for your Caches [developer.android.com]
  • Android Performance Pattern DevByte - why 60fps [youtube.com]
Image libraries for Android:
  • Picasso by Square [github.com]
    • fetch introduced in V 2.5.0 (Changelog) [github.com]
    • Picasso doesn’t do bitmap recycling
    • Jake Wharton’s thoughts on Picasso not having a bitmap pool [github.com]
  • Glide [github.com]
    • github issue where author explains tags being used to store metadata[github.com]
    • Glide  does bitmap recycling
  • Ion
    • DeepZoom with Ion [youtube.com]
    • Uses BitmapRegionDecoder to implement DeepZoom[developer.android.com]
  • Volley
    • Ficus Kirkpatrick introduces Volley in Google.IO [youtube.com]
    • Doesn’t come with an image caching mechansim out of the box[stackoverflow.com]
  • Fresco
    • Introducing Fresco [code.facebook.com]
    • Romain Guy concern over native api call [twitter.com]
  • Other noteworthies that we did not discuss:
    • Universal Image Loader Library comparisons by others:
  • Picasso vs Glide [inthecheesefactory.com]
Image library comparisons:
  • JesseWilson on Picasso vs Fresco :P [twitter.com]
  • JesseWilson Picasso:Glide :: Coke:Pepsi [twitter.com]
  • Image comparisons by Koushik Dutta [plus.google.com]
  • Volley vs Picasso [bignerdranch.com]
Awesome picks:
  • Donn
    • Moshi - A new modern JSON library for Android and Java from the Square guys
    • JsonSchemaToPojo: Take json or a json schema and turn it into POJOs.
    • Parcelabler: Generate Parcelable implementations with a click of a button
    • Parceler: Android parcels created through Code generation
  • KG:
    • Not your father's Java: 3 part blog post series An opinionated guide to modern Java development
    • Stetho caster.io screencast: Debugging Android with Stetho - Donn’sscreencast
    • Cleartones : professional ringtones!
Contact Donn Felker
  • @donnfelker [twitter.com]
  • donnfelker.com
Kaushik Gopal
  • @kaushikgopal [twitter.com]
  • kaush.co


fyyd: Podcast Search Engine
share








 April 17, 2015  1h34m