Working with Android

Over the last ten years I’ve made a few toy Android apps, mainly to see if I can, but sometimes to scratch an itch.

That itch has returned, and wow, the first-time experience for getting started with Android Studio really really hasn’t gotten any better.

  • Download and install: fine
  • The first sample I want to try: requires a Canary version of Android Studio
  • The next sample: requires an older version of the SDK to be installed (lucky I already know that that means playing with SDK Manager and that API 29 means Android 10, right?)
  • Giving up on samples and just creating a basic new app: works fine! yay!
  • Running it: still requires opening up and messing with AVD Manager. And of course there are no default settings for anything other than Google devices, and nowhere I can see that publishes a range of hardware profile to import.

For fuck’s sake, what happened to helping the user? Why not just enable the “Run” button and wizard the shit out of that first run experience? Why make it so hard?


Devices in my house running WebKit

  • Android phone
  • Android tablet
  • iPod touch
  • iPhone
  • iPad
  • 2 x laptop (Windows Vista)
  • desktop (Ubuntu)
  • TV (Samsung)

The browser in my Nintendo DSlite and 3DS is Opera.

I don’t use the desktop version of Google Talk, nor Windows Media Player so my most frequent exposure to Trident is probably via Skype. I almost feel sorry for the Microsoft IE team. Almost.

Google Currents

At first blush I didn’t know what to make of Google’s new iOS and Android app, Currents, other than it is an almost infinitely better way to consume The Guardian than their own Android app.

After a few hours I’ve got a much better idea, and broadly, I’m not impressed. No URLs, No view-source and half the content I’ve read seems to be partial with a link through to the source website, but within the app so still no URLs or view-source. Very unsatisfactory.

When the iPad came out it got slated for being a consumption device and nothing more. That’s been shown to be false, but Currents takes that thought and runs with it. It’s the antithesis of what reading on the web should be about.

My next phone

android-usb I have a Motorola Milestone and on the whole I’ve been happy with it. There have been a few issues which affect me (all introduced by Motorola themselves) but hopefully these will get resolved with the next software update, and of course I’m very much hoping that Froyo hits my device.

The camera is poor though, so when my contract is up in a year’s time, that will be a requirement.

More pressingly though, I’m finding that I have more and more portable devices that support USB (pen drives, external hard drives, cameras, mp3 players, my kindle-of-the-future), and I want my phone to act as a host for these. It is, after all, my always-on, always-with-me computer, and has all the apps I need to manage those devices and a wifi connection so I can up- or download any bits that I need.

As far as I know, none of the Android devices come with it supported natively, but people have got host mode working on both the Nexus One, Milestone and Hero using custom kernels. The Nokia N800 and N8 seem to do it out of the box:

N800: Ultimate Portable USB Host

Increasingly, my laptop is a barrier to doing things like getting photos online. I realise I could get an eye-fi or something similar, but that also takes away a level of flexibility and pre-upload functionality that my phone gives me.

Here’s hoping it’s a popular or common feature in a year’s time!

The new model of buying music

My phone runs an app that idenitifies the song that is currently playing on the radio and an app to then buy and download that song, or the album it’s from. The two are seamlessly linked.

I am probably late to this, but listening to 6music whilst I have both Shazam and the Amazon mp3 store available to me means that, wherever I am, provided there’s not too much background noise, downloading a song that’s playing is about five presses of a touchscreen away.

This is not a good thing for my bank account but a bloody brilliant thing for those record execs looking to buy a new boat.

Android apps I have paid for

Droidbox pro (a dropbox client that came out months before the official one, and still seems better)

Jewellust (a bejeweled clone)

BeyondPod (a podcatcher. I have stopped using this since I realised it was trashing filenames)

Reddit is fun (because the author deserved my $1)

Other than BeyondPod, I recommend these paid-for apps. BeyondPod may have fixed my bug, I haven’t checked.

The other 50 or so apps I have are free. I am very much hoping that froyo (android 2.2) comes to the motorola milestone so that I can install apps to the sd card – I keep running out of internal memory!

Online ebook catalogs in Atom

As I recently wrote, I have a new-found interest in ebooks (I also bought four new textbooks from O’Reilly using a BOGOF offer to pick up 97 Things Every Programmer Should Know, 97 Things Every Project Manager Should Know, Beautiful Code and The Art of Agile Development).

I mainly read ebooks on my Android device, specifically, using Aldiko.

Aldiko has a built in browser for the catalog, but also gives you the ability to add your own catalogs. A friend told me that Calibre, a popular ebook management programme, has a web interface which one of the other popular Android ebook readers (WordPlayer) could be pointed at in order to add custom catalogs. After a quick trial and a few Google searches, I realised that WordPlayer actually subscribes to an XML file hosted on http://localhost/calibre/stanza

Opening this file shows it to be Atom, where each entry is a small metadata container and the link element is used to reference the actual book and images that represent it, like this:

    <link type="application/epub+zip" href="/get/epub/3"/>
    <link rel="x-stanza-cover-image" type="image/jpeg" href="/get/cover/3"/>
    <link rel="x-stanza-cover-image-thumbnail" type="image/jpeg" href="/get/thumb/3"/>

Another few searches showed this to be a draft specification called openpub. Aldiko supports this, so adding the /stanza URL to a custom catalog works there too! Voila, custom catalogs in Aldiko. Marvellous!

It should only require a tiny bit of work to write code that serves a catalog straight from the filesystem without the overhead of Calibre (which I found to be quite heavyweight). This is what I have started here.

Reading eBooks

I’ve now read three books on my phone (you can see which ones here). I never thought it would be possible to read on a screen that wasn’t designed for this purpose; I was sure that you’d need a Kindle or Nook-type screen to be able to read in comfort and for long periods of time.

The girl with the dragon tattoo
The Girl with the Dragon Tattoo on my Motorola Milestone

It turns out that when I have time to read it’s typically on the train or bus (OK, mostly waiting for the train or bus followed by a brief journey), and then a few hours at weekends. Reading on my phone is fine for these use cases and in fact normally more useful since I always know where my phone is, and it always knows where I left off from.

Some facts:

  • The screen has a resolution of 854×480
  • I read in white on black
  • I read using Aldiko (although I tried WordPlayer too)
  • I have used the built-in catalog browser for virtually all my downloads
  • I have experimented with using Calibre to convert PDFs into eBooks and for magazine subscriptions. This is all simple.

I am pretty much a convert. There are definitely some downsides to reading books on a screen – it’s hard to pass it on afterwards, for example, or to quickly show someone a particular bit of text (since on such a small screen they’d need to go back three pages to get the same amount of context you’d get on a printed page or a proper ebook reader).

But I am astonished by the price of ebooks. From the little I’ve looked around they seem to be at best a few pounds (or dollars) cheaper than the dead tree equivalent, and I was certainly expecting a massive discount. Let me make a trite example:

The Girl with the Dragon Tattoo:  book, $5.50, ebook, $5.42

and that is only for the books that you can get in DRM-free format, of course. Unlike, say, books that are printed on paper, some books are only available in certain formats or available for certain readers. It’s like they looked at the mp3 sales business of 8 years ago and said “yep, that looks like a great business model to us!”.

The pricing rather makes a mockery of the value of a printed book – do publishers really want to be telling me that the physical thing I hold in my hand is worth far, far less than the license for the artwork on the cover? Even if it is, the devaluation in the item that this revelation causes means I’m likely to be more frugal with my book purchases, not less.

All in all, although I thought I’d miss the whole tactile sensation of paper books, I don’t. I do miss the covers and a row of spines in a bookcase, but it’s not as if I have rows of CDs still out in my house. They all got ripped and are now in my loft.

I fully expect that over the next year most of my casual book purchases, or book-reading at least, will get done on my phone. After that time I may buy a proper ebook reader, certainly the experience I’ve had so far has indicated I am going to be spending even more of my time looking at a screen in the future.