MusicBrainz for Android 1.1

Yesterday I published the first major update to MusicBrainz for Android!

Things you can’t see

There are many invisible changes. The code that communicates with the web service has been packaged in a separate jar for easy unit testing. The app also makes use of the new AsyncTaskLoader from Honeycomb and the Android compatibility library. These things will make future changes a lot easier.

Things you can see

There are a few visible changes too. The app now uses the wonderful ActionBar Sherlock library and there are some improvements to the action bar generally. The app makes use of tabs in various places and you can now swipe between them. The visual design of the tabs has changes to be more Ice Cream Sandwichy too. Finally, the dashboard has been shuffled around to make it easier to see your search history suggestions.

What’s next?

The next set of things I’m thinking about are (in no particular order):

  • Better various artists release display
  • Info pages and search for labels and recordings
  • Displaying more ARs (such as band members)
  • Collections support
  • Better dashboard icons
  • Xlarge tablet support

You can add or vote on issues under ‘Mobile Applications’ on the MusicBrainz Jira site. If anybody wants to get involved or follow progress, the source is on GitHub.

Novocation

I’ve started working on a small open-source library to make it easier to implement location best practices in Android apps. This is largely inspired by Ignition Location (and Reto Meier’s location pro-tips demo in turn). The main difference is that Novocation doesn’t use AspectJ.

The idea is to have a jar that you can import into your Android project. You can then configure the location parameters once and simply start and stop location updates from your Activity classes. It’s also possible to listen for a broadcast in your Activity each time a fresh location becomes available.

This source is available on GitHub, including a demo application. Bear in mind that this is very much a beta at the moment.

Update 1: This project began when Ignition Location was incompatible with Maven, which we use for build automation at Novoda. That issue is now resolved, so you should check out Ignition Location too.

Update 2: Luigi has been doing some work on this and the demo app is now on the Android Market.

MusicBrainz for Android: Intents

Last weekend I took the train to Rotterdam for the MusicBrainz summit. It prompted me to do some housekeeping. The Android app now has a product page on the MusicBrainz website and I’ve added all of the issues to the issue tracker.

Another thing I’ve been meaning to do for a while is mention that your app can launch the MusicBrainz app to display metadata using URI Intents. This might be interesting to you if you write, for example, a music player app.

Artist page:
musicbrainz:///artist/MBID
Release page:
musicbrainz:///release/MBID
Search:
musicbrainz:///search/artist/QUERY
musicbrainz:///search/release/QUERY
musicbrainz:///search/QUERY (Both artists and releases)

I’ve been thinking about a better Intent scheme but there is no timeline for that and these Intents will continue to be supported regardless. So go ahead!

supports-screens and the tablet Market

There is a pretty common case right now where an app is not yet optimised for xlarge screen tablets and you don’t want it to be available to these devices through the Android Market. Running apps designed for phone size screens on 10″ tablets often results in a poor user experience and ultimately bad reviews.

It was possible to get this filtering effect using android:maxSdkVersion="10" but this technique will not work with Ice Cream Sandwich, which will have a higher API level and include screens of all sizes.

My first thought was to set supports-screens in the Manifest.

1
2
3
4
5
<supports-screens
  android:smallScreens="true"
  android:normalScreens="true"
  android:largeScreens="true"
  android:xlargeScreens="false" />

When I uploaded the apk to Market I received this counterintuitive message:

API level: 4-12+
Supported screens: small-xlarge
OpenGL textures: all

It turns out that supports-screens is not used for Market filtering. The only reliable method to prevent an apk from being available to xlarge tablets is this rather ugly use of compatible-screens.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<compatible-screens>
<screen
  android:screenSize="small"
  android:screenDensity="ldpi" />
<screen
  android:screenSize="small"
  android:screenDensity="mdpi" />
<screen
  android:screenSize="small"
  android:screenDensity="hdpi" />
<screen
  android:screenSize="small"
  android:screenDensity="xhdpi" />
 
...
 
</compatible-screens>

… and so on for normal and large screens.

I would love to know if there is a better way to do this but the documentation doesn’t suggest any alternative.

Novoda at Over The Air 2011

It really is conference season right now. Last weekend was Over The Air, a mobile developers event set in the amazing Bletchley Park. I gave a talk about the Android platform across different types of devices and the tools available to create novel user interactions. A few of us took part in the hackathon too.

David Cuartielles, co-founder of Arduino, gave a great talk and brought a bunch of boards, sensors and other such things to play with. Myself and LuigiĀ ended up creating a “wearable build server indicator” to try out connecting Arduino to an Android phone using ADB. This technique allows you to connect an Arduino to practically any Android device, whilst the Android ADK’s accessory mode is only supported on some of the latest devices.

We basically connected an Arduino ADK board with a few LEDs and a button to a phone, which queried our Jenkins build server to display build status. We won a hand-soldered Adruino Serial. Now we just need to work out how to frame a circuit board.

Kevin also made a really neat enigma themed app to encrypt messages with a shared secret stored on an NFC card. I think we can score “something with NFC” off the ideas board in the office. Hopefully the event is back at Bletchley Park next year and I’ll remember to take the tour.

Novoda at Charity Hack 2011

Three of us from Novoda attended Charity Hack at the PayPal offices in Richmond last weekend.

We created a website and Android app called Lovep.ie! The idea is to allow people to decide how much they can afford to donate and then split it evenly between a set of selected causes. I worked on the Android app, which was a good excuse to play with Roboguice dependency injection and Gson parsing. Here are the results:


There is a little more on the Novoda blog.