Sunday, 28 October 2012

Droidcon London 2012, Day One

The first day of Droidcon London was a barcamp, though one with lots of pre-prepared presentations.

The main highlights for me were finding out about useful libraries and services developed by the Android community — RoboSpice, TestDroid and Dr. Power — that and meeting more Android developers (apparently there were over 1000 there!).

immersion haptics

  • haptic effect preview app available on google play
  • immersion started with game controllers
    • e.g. logitech steering wheels
  • also have automotive
  • android just has vibrate on and off
  • immersion sdk extends the vibrate method
  • http://immersion.com/haptic/sdk
    • adds about 400Kb to app…
  • deals with all different vibration methods
  • copes with devices with no motors (just doesn’t do anything…)
  • best tweet about haptics @hapticsdev wins a galaxy note 2
  • navigation queues
  • battery usage — about 3% for an hour of vibrate usage during a game
    • goes down to 1% for piezo vibrators
  • but don’t use the motor the whole time — it just annoys the user and dulls their senses
  • leave the haptics and sound options separate (so people can play silently but keep haptics)
  • standardisation of patterns for accessibility?
    • library of 124 effects is a default standard
    • up to RNIB to come up with semantics

robospice

  • library for making async network requests easy
  • https://github.com/octo-online/robospice
  • intro guide
  • available on maven central
  • AsyncTasks not so useful as the activity can change while the task is still processing
    • e.g. if device rotates while running, then asynctask could update the wrong activity
    • leads to memory leaks
  • Loaders are an alternative
    • but designed for database access not networking
    • can’t keep the response if the activity changes
    • no exception handling by default
  • RoboSpice uses a background service
    • activity creates a request and a request listener
    • request passed across to the service by the spice manager
    • requests can last beyond a single activity, so can pass results to the newly rotated activity
  • each context that needs a remote call will have its own SpiceManager, each of which binds to the SpiceService individually
    • can have a SpiceManager in an activity, a service, a fragment, etc
  • SpiceService keeps results in a cache so can respond immediately
  • integrates with Spring RestTemplate for Android

text layout for localisation

By Kotikan, developers of SkyScanner

Charles & Robert@charlessharley

  • different languages have radically different word lengths for the same concept
  • best solution is to guide your translators to use shorter text lengths
  • sometimes not possible…
  • built-in truncation only operates on the whole string — can skip out important words or syllables
  • created custom TextViews
    • resizes text to fit (keeps on getting smaller)
    • flexible truncation using markup
  • code currently not available as open-source, though Charles & Robert trying to persuade their company that this would be a good idea…

resizing to fit

  • need to separately subclass TextView, Button & CheckedTextView
    • put resizing logic into a common utility class
    • decreases size (down to minimum) until fits
  • also have harmonisation to keep consistent text size amongst similar widgets
    • have a harmoniser that listens to text size changes across a group of widgets
    • sets text size of all to smallest of group
  • also used XML group ID to define harmonising groups in layout
    • include a new namespace
    • defined as res-auto so will be populated with package name
    • can be used to add additional attributes
    • key needs to be group ID and context so that XML files across the activity can be grouped together
      • context must be declared as a weak reference to avoid memory leak

flexible truncation

  • check need to truncate first
  • then parse markup to split sections
  • measuring each section
  • truncate sections to fit space available
  • cache text panes

KirinJS

James Hugman @jhugman http://bit.ly/kirin-github

  • most apps James has written are fairly IO bound
    • so performs fine for them
    • obviously, games would not be suitable
  • Glasto 2011 app stored JSON data into SQLite
  • other similar approaches:
    • Calatrava — similar to Kirin but from a web dev point of view
    • j2objc — compile java into Objective-C
      • under heavy development…
    • Ejecta.js — write to canvas, renders in OpenGL

Sony SmartWatch

Jerker Lindgren Götsten jerker.lindgren.gotsten@sonymobile.com

SDK available at http://sonymobile.com/developer (also available as ADT extensions)

  • notification & control APIs are shared with SmartWatch + Smart Wireless Headset
  • notification is stateful, with a central database on the phone
  • battery life is an issue — watch can last less than a day if over-used…
  • also frame rate is 6-7 FPS for full screen images
    • faster for partial updates
  • extensions can be started either by an app on the phone, or by the user on the watch
  • you get a Pause event if a high priority input happens (e.g. phone call)
  • SDK has utility classes to receive sensor events or send updates
  • music player also available as open source
  • host app searches Google Play looking for extensions that include LiveWare… phrases
  • sports apps are working really well in Google Play
  • other apps:
    • remote camera viewfinder
    • tic tac toe, puzzle
  • popular in Japan — with other small technologies :-)

OpenCV for Android

Erik Hellman

  • Android library is a wrapper on top of native API
    • includes armv5, armv7 and x86 variants
  • object detection
    • face, hand, eyes, edges
  • optical flow lets you track points in a moving video
  • lots of alternative classifiers available (search online)
    • haar cascade is a little bit slower than lbpcascade
  • in Android, front facing camera is 1, main is 0
  • better to work with smaller preview window size
    • 320x480 is often enough
  • faster to reuse bitmaps & matrices (avoids lots of allocations)

New Samsung developments

Manfred Bortenschlager http://developer.samsung.com

  • planning to have Samsung apps on fridges, washing machines, air conditioners as well as phones and cameras

galaxy camera

  • 21X optical zoom
  • Android 4.1,
  • basically a Galaxy S3 with a camera attached!
    • still has 3G and Wi-Fi
    • feels fairly hefty for a compact camera
  • software control gives you additional camera features:
    • automatic zoom to moving object
    • zoom while taking picture (for effect)
    • slow sync to enable light writing
    • voice control
  • current API (work in progress):
    • ParametersEx class with 130 methods…
    • setAperture, setShutterSpeed, setIso, etc
  • sample usage: camera = Camera.open() params = new ParametersEx(mCamera) params.set... params.updateParameters()

Stella SDK

ChatON & AllShare

  • ChatON: online chat
  • AllShare: online media storage & sharing

Big Fat Soft-Key

Giovanni Bisutti http://inputdynamics.com/

  • using microphone & accelerometer to detect taps on phone case
  • works on back or front of phone
  • expect SDK to be released next year
  • uses up to 7% of CPU when in use… (though more optimisation required)
  • new app being demoed next month
    • mostly native code
  • looking for an Android developer to help develop the SDK…

Future of Android - OUYA Game Console

Julie Hurman @jhurman

http://ouya.tv/

  • made $8.5m on kickstarter… ($1m in 8h22m!)
  • disrupting a market that hasn’t changed in 30 years
    • consoles and games are both expensive to purchase
  • OUYA is about openness for both gamers and developers
    • all games will be free to try
    • developers build for Android (no cost for SDK)
    • every single OUYA is a debug console
  • working with NVIDIA to have best Tegra3 performance
  • will have its own storefront
    • will curate content (review for copyright infringement, spyware, etc)
    • will not have ads
  • schedule
    • first units are coming off the production line
    • dev units will be out in December
    • kickstarter backers will receive units in March
    • aiming for full roll-out in April
  • goal is to potentially refresh OUYA on a yearly basis
    • won’t have a 6-7 year lifecycle of existing consoles
    • some of the audience were concerned about whether a stock NVIDIA chip would be able to have an impact in the living room when facing custom hardware from the likes of Sony. But as John Carmack has said, “technology doesn’t hold back game designers anymore.”
  • store will have cryptographic controls for securing content, but they’re working to allow root access to the device as well (could be interesting)
  • will be able to show the games that have had most time played in them
  • going for 70/30 revenue share
  • majority of SDK is in-app payment API

Demo Camp

This was lots of very short (1 or 2min) product demos. Some better than others…

  • testdroid app crawler
  • palerta — private social smart friend alerter
    • doesn’t overshare your location
    • by Little Fluffy Toys
    • also make location library
  • Tawkon - Dr. Power
    • can see power usage on individual processes of each app
  • secret.dj
    • 300 venues
    • see what’s playing & add to playlist
    • gamification to gain credits & jump queue

No comments: