Sunday, 28 October 2012

Droidcon London 2012, Day Two

The second day of Droidcon London — and they kept us going from 9am until 7pm with a full programme! As with the previous day, the keynotes were focussed on how Android is being used in non-phone devices — extending the rule of configurable software over fixed hardware.

I’d really like to add the slides to these notes — the Flurry presentation especially has loads of useful information that I didn’t catch. If any of the authors read this — please get in touch via twitter or leave a comment and I’ll add a link!

Future of Android - Vendscreen

Paresh Patel

http://www.vendscreen.com/

  • touchscreen device that fits as an extension on any vending machine
  • accepts credit cards via swipe + tap to pay
    • chip & pin coming later
  • network connected — makes the machine smarter
  • can cluster machines
    • e.g. lots of machines in a hotel
    • customers can get inventory from their phone
    • energy management — can turn off some
  • example: sold small artwork pieces in a vending machine
    • people weren’t surprised
    • prices didn’t have to be low
    • people paid up to $99 by swiping their card
  • right now running Android 2.3.4
  • minor modifications:
    • got rid of desktop
    • added a recovery screen

Future of Android - Parrot Asteroid

Frederic Albinet

http://www.parrot.com/uk/products/hands-free-car-kits/parrot-asteroid

  • parrot asteroid Android car radio
  • classic & mini using Android 1.5(!!?!)
  • tablet and smart devices using Android 2.3 (still old…)
  • does voice recognition search for contacts and music
    • music searches across connected device and also the internet radio stations and other sources
  • parrot app market
    • will be live from november
    • can browse from PC or from device
  • looking to extend to dynamic network between vehicles
    • though this would depend on other cars having devices with the same protocol…

ADzero phone launch

http://www.justadzero.com/

  • world’s first bamboo smartphone
  • quad core device
  • full HD screen
  • bamboo feels really good to hold
  • flash innovation: circle around the camera — works much better for macro

building songkick

Akshay Dashrath and Jamie McDonald, Novoda

  • took 2 devs 3 months to build initial version
  • agile process, two week iterations
  • tools used:
    • pivotal tracker
    • github
    • maven
  • third party libs:
    • ActionBarSherlock
    • ViewPagerIndicator
    • Novoda ImageLoader & Novocation
    • NovodaTime — dealing with Joda Time problems

user experience design

  • spent a lot of time finding pain points in initial install process using paper prototypes
  • found out that putting buttons in the action bar were not found by users
    • mocked up on an actual device to see how it felt
  • can set a custom notification light colour (works well with branding!)
  • styled login web view to look like rest of app
  • first launch experience:
    • had a scan screen with an OpenGL animation to keep the user entertained while the initial artist information is found
  • used external apps that expose content providers
    • google music — got artist names using a projection and flexjson to push it to songkick server
    • last.fm

caching & location

  • used novoda’s novocation location library
  • used Jackson mixture of streaming & tree model to avoid memory issues
  • data from web calls loaded into database, then database loaded into views with cursor loaders
  • detachable result receiver — google IO 2011 app
    • lets you deal with rotating views and re-attaching the new activity to the old cursor loader
  • all visited content cached using Reto Meier’s Big Cookie approach (see Making Good Apps Great)
    • “Just Added” concerts sync in the background
  • if offline, then shows a transparent banner at the bottom of the page
    • send out a sticky broadcast if an online query fails
    • broadcast cleared if the app gets a good response
  • Big Cookie caching can build up too much data
    • data removed on a daily basis by removing old data — e.g. past concerts, etc

testing

  • manual QA for most stuff
  • automated tests were more for stress testing
  • also did observational user testing (one-way mirror room)
  • put UI options in a debug menu so could easily do A/B testing
  • build machine runs instrumentation tests on however many devices are plugged into it
  • used Eclipse Memory Analysis Tool to check memory allocation
    • used to fix large back stack activity
    • enabled StrictMode to deal with issues with Google Analytics & Joda Time
    • Joda Time used the UI thread for DST settings (can be fixed — see Stack Overflow)
  • got featured in Play
    • installs went 400 / day -> 20,000 / day!

soundcloud audio in Android

Jan Berkel and Jon Schmidt, SoundCloud

playback

  • Java MediaPlayer talks to C layer MediaPlayerService
    • check out the C source code to see what’s going on
  • underneath this uses PacketVideo OpenCore up to 2.2, then Google Stagefright
    • shouldn’t have to care about underlying implementation but if you’re doing something complicated you do…
    • OpenCore
      • mature, stable but limited
      • seekTo doesn’t work in streams
    • Stagefright (default from 2.2 and beyond)
      • fixes seeking
      • but not available in all devices…
  • when launched shortly after 2.3 released decided to support 2.1+ so that could cover 75-80% of devices
  • to find out which mediaplayer, tried to read /system/build.prop
  • however, some phones had both frameworks!
    • one for streaming and one for encoding…
    • playing locally would behave differently than streaming from a server
  • so to actually find out, connect the MediaPlayer to a local socket and read the user agent on the other end…
  • built a StreamProxy local server
    • could cache and fetch chunks from CDN
    • MediaPlayer then talks to proxy
    • inspired by NPR android app
    • but still no control over buffering (may want to alter it depending on network conditions)
    • different versions of Android behave differently
      • ICS has a huge buffer so takes ages before it starts playing…
  • bundled Android HttpClient is broken (it’s an old snapshot, not a proper release)
    • have to catch NPE from execute!
    • recommended to use standard Java URLConnection
    • bundled HttpClient has now been deprecated

recording

  • live encoding options on earlier Android versions — just AMR AB
    • only good for voice
    • narrow range, low quality — sounds like a phone call
  • instead recorded in PCM and used 3rd party lib to encode it before uploading
  • chose ogg vorbis
    • good for licenses
    • java port is slow (and incomplete)
    • would take 4x length of audio to encode!!
  • from 2.3.3 Android introduced AAC encoding
  • new requirements involved getting at the actual audio data — simple editing, resuming record
  • had to write own native layer for codecs and audio processing (Java too slow)
    • used C-based Vorbis Encoder & Decoder with a thin wrapper
    • also added a native amplitude analyzer
  • tried to avoid sending data back and forth too often
  • but… now had to deal with CPU flavours
    • armv5 on older devices has no floating point support
    • have to build native pieces for various architectures (armv7, mips, x86)
    • older devices fall back to old-style encode later style
  • Jelly Bean has new media encoding APIs
    • will be useful in the future…
  • some sony devices have a patched media framework that behaves differently…

bug detection

  • robolectric
  • bugsense crash reports
  • get a load of devices and get people to use them

The fly-in app menu for designer and developer

Cyril Mottier @cyrilmottier

  • watch out for activity back stack
    • recommended to only use fly-in menu at root level
    • but still want the back button to exit the app without going via the fly-in menu
  • libraries (all on github)
    • android-undergarment
    • slidingmenu
    • android-menudrawer
  • don’t slide the actionbar
    • you’d need a custom actionbar…
  • or create your own: need a custom view group & view
  • see “making of prixing”
  • make the slid out activity inactive
    • click on it to make it visible again
  • may need to think about right-to-left languages having right-sliding menus

Who needs thumbs? Android Instrumentation and Reverse Engineering

David Teitelbaum http://blog.apkudo.com/

I only caught the very end of this, but it looked like it could be a really useful talk — worth chasing down the slides

Android and Arduino

Fei Manheche, Robobo

  • 3 steps:
    1. build basic circuit & test it from PC (use serial monitor via direct connection or Bluetooth)
    2. build basic arduino software to set it up to be controlled from Android
    3. build Android app to talk to Arduino
  • bluetooth modules available for £6-10
  • use amarino library to simplify bluetooth between android and arduino
    • can also use amarino app to test basic bluetooth connection
  • don’t send too much data to the arduino at once (unless you write buffering serial code on the arduino…)

Memory Analyzer: avoiding memory leaks

Felipe Ferraz, CESAR

  • each process on Android has its own Dalvik VM
  • the Zygote process is forked for each app
    • it already has common libraries mapped into it, so they’re shared as read-only between all apps
  • use adb to make a heap dump (kill -10 <pid>)
    • or use Eclipse…
  • useful to create multiple heap snapshots to tell story of memory leak
  • http://www.eclipse.org/mat/
  • make sure to null Callables inside Images

Using Ubuntu to develop cloud-connected android apps

Victor Palau, Ubuntu

  • juju: https://juju.ubuntu.com/
  • orchestrates groups of servers deployed to cloud systems
  • can deploy a local instance or to Amazon ECS (or any other OpenStack compatible service)
  • local deployment uses zookeeper to set up containers on a single machine

Mobile Analytics - taking your Android app to the next level

Simon Podd, Director of Sales, Flurry EMEA

  • according to EMF there are 2Bn “affluent adults” in the world
  • 17% of time spent in Android apps is in Europe
  • time spent in apps is increasing month by month (94mins/day in Dec 2011)
  • social networking category is growing fast (equal to games in Q1 2012)
  • Flurry tracking 220K apps across 660m devices
  • iPad makes up 88% of top 3 tablet sessions
  • of the top 20 Android devices by worldwide sessions (May 2012), the top 3 are:
    1. Galaxy SII
    2. Galaxy Ace
    3. Moto Defy
  • worldwide 2011 app revenue (iOS & Android):
    • 52% in-app purchases
    • 24% mobile advertising
    • 25% app sales
  • advertising revenue (from Flurry’s ad slots):
    • iOS $6-10 eCPM
    • Android $20-30 eCPM

gaming category stats

  • ages 13-34 spend most time in apps
    • 18-24 & 25-34 about even
    • fairly even gender split
  • more money spent by 25-34yo men (29%)
  • average transaction sizes fairly constant across ages, and higher than you might think:
    • M: $15.60
    • F: $11.90
  • customers download on average 50-85 apps during a device lifetime
  • but they only use 5-10 apps a day
  • there’s an app discovery issue on the device

flurry tracking

  • can use ranges for event parameters…

Applying lean principles to enterprise mobile development

Dave Slocombe @daveslocombe — Head of Mobile Channel, lastminute.com

  • product scorecards
    • 5 or 6 key goals for the year
    • see Marty Cagan, SVG
  • keep time to release short
    • don’t miss the opportunity to innovate
  • avoid big bang releases
  • essentials: co-location & cross-functional

generating and managing ideas

  • ideas should come from all sides of the business
  • need to have a massive bucket of ideas
  • make them visible so you can choose amongst them
    • great for managing HiPPos (highest paid persons)
    • they can see that their idea is on the board
  • doesn’t mean that you have to work on them!
  • prioritise ideas
    • use the product scorecard

selecting ideas for development

  • UX team does customer insights
    • qualitative: what problems are we solving? is there a market?
    • quantitative: talking to data analysts
    • looking for strong signals
  • product owner reviews customer insights
  • UX team create designs in iterations, increasing fidelity as they go
    • want to be able to ditch bad ideas before spending too much time on them
    • try guerilla testing: take it to someone in a coffee shop and ask them what they think
    • get marketing and devs involved as well
  • get UX ideas out without using developer time
    • use axure or similar
  • have an internal site of proposed designs
    • available to exec team
  • play back early stage designs to other teams, like finance and supply
    • surface problems and feedback early
  • if ideas are generated, they can go back onto the ideas board (don’t deal with them right now)

development processes

  • retrospectives
    • done every two weeks
    • if you leave it longer, the issues get bigger and harder to solve
    • more frequent = smaller, easier to fix issues
    • e.g. found that they needed a “design issues” wall
      • edge cases found missing by the designer, not captured
      • introduced “creative coding” — designer + developer pairing, making a first pass of the UI
      • brings designers into what’s possible on mobile
      • helps devs understand value of brand & aims of user experience
  • Dave was originally a skeptic of pairing, but converted:
    • sharing knowledge
    • repeatability, consistency
    • drives out “hero developer” mentality

testing & releasing

  • “release process is the metronome that drives progress”
  • continuous deployment
    • every check-in should be deployable
    • repeatable consistent environments
    • currently 12mins to deploy to production
  • devices are tiered for testing:
    1. automated tests, max experience, manual test
    2. automated tests, optimum, limited manual
    3. observe trending, monthly testing, graceful fallback
  • just pushed iOS 3 down a level
  • looking at webdriver to generate PDFs for visual check

tying it together

  • showcase every two weeks
    • include other departments
    • no roadmap items, just value added in the last two weeks
  • focus on what your customers say, not what the industry says is cool
    • apps vs web — choose from your own analytics
    • e.g. for travel, 3x more likely to book on web
  • stats:
    • seen 10% month on month growth in Android, compared to iOS
  • ensure product always gives tech team 20% tech debt time

Replacing the Android emulator

Daniel Fages, Genymobile

http://androvm.org/

  • built on top of android-x86
  • has an emulated WiredSSID wi-fi connection
  • can use OpenGL 2.0 using hardware
    • works really well - can emulate Angry Birds
  • just added injecting sensors from attached Android device (accelerometer, etc)
  • currently working on management tool and other features
  • looking for feedback on next features
    • network
  • also can install VM on other people’s machines without having to worry about SDK
  • will be working to integrate with Jenkins
    • could be great for creating a snapshot when something goes wrong
  • not working:
    • multitouch
    • NFC, Bluetooth
    • GSM pieces: SMS & voice

Developing accessible apps for Android

Gary Readfern-Grey, RNIB

  • many people are relying on apps as the only way to do crucial things in life
  • talkback comes with Jelly Bean
  • problem:
    • icon-based buttons don’t have proper audio labels (“icon 39”, “icon 19”) so can’t find what is on the screen
    • watch out for “jump back button button
  • accessibility came in on Donut 1.6
    • relied on physical keyboard and trackball
    • touching the screen behaved as normal and gave no feedback
  • Talkback and Eyes-free-keyboard added more recently
    • eyes-free added in Gingerbread
  • ICS brought in explore-by-touch
  • Jelly Bean brings in gestures:
    • moving focus
    • back, home, recent apps
    • notification shade
  • WebView is harder
    • Jelly Bean & ICS have an additional “allow web accessibility” checkbox

testing your app

  • download talkback from google play
    • Jelly Bean has it installed (at least on Nexus 7)
    • settings / accessibility / turn on Talkback
  • check that views are focusable and have content descriptions
  • custom views need hover events

documentation

  • Google I/O 2012 making android apps accessible on youtube
  • developer.android.com: making applications accessible
  • android 4.1 accessibility APIs

top things to do:

  • add content descriptions to your widget
    • can do in XML layout using android:contentDescription attribute
    • or use setContentDescription
    • latest linter should check for this
  • make sure you can get to all elements of the app through a keyboard
    • will also help for Google TV
  • don’t depend on colour alone…
    • e.g. “correct the field that’s coloured red”
  • test it! try out Talkback
  • RNIB Innovation can help you
    • RNIB offer paid consultancy
    • if they’re doing something that RNIB really want and aren’t in a position to pay, then they could offer free help too
    • innovation@rnib.org.uk

No comments: