ConnectIn

Saturday, Sep 25. 2010  –  Category: Android

qrcode While my day job has been working on the Rdio Android app, I’ve continued hacking on other random Android related things on the side to learn about the other aspects of the platform I haven’t touched yet. One of the things I love about Android is the ability for apps to deeply integrate into the system. On an iPhone or Blackberry you can tell where the boundary is between phone and app. Startup the Phone Book/Contacts on a Blackberry or iPhone and you know you’re looking at something built by RIM or Apple. On Android when you start the Contacts app, the contacts you see are being populated by your Google Contacts, Twitter, Facebook, etc. While I’ve been working on the Rdio Android app, I came across the section on how to write SyncAdapters to sync contacts from the cloud into your Android contacts…

Meanwhile, back in the world of social networking… one of the places I keep a profile is LinkedIn. I’ve found it to be a useful resource and a great professional social network. I thought it’d be really handy to integrate that into my Android Contacts… so 1+1=2 and a few days of hacking later, I’ve built the ConnectIn app.

It syncs your LinkedIn connections into your Android contacts, notably it syncs over phone numbers, photos, status updates, and “headlines” (which are the “Senior Muckity-Muck at Foobazco, inc.” title things). It also adds a link to invoke the browser to load the full profile. I’ve released the initial version in the Android market for $0.99 (USD). It’ll be an interesting experiment… I’ve never sold software before (at least not directly).

Some features I plan on implementing: an in-app profile viewer (rather than kicking directly off to the browser), people search, and whatever else I think of that seems interesting and relevant. Anyway, if you have 99 cents to blow and want to check it out, scan the QR code to the right.

Once you install it, it’ll be accessible via your System Settings > Accounts & Sync screen. Click the Add Account, and you should see a LinkedIn account type. Click that and you’ll be walked through the LinkedIn OAuth authorisation process. Once that’s done it’ll automatically start syncing in the background. To actually display the contacts go to your Contacts app and go to the Display option in the menu to enable display of LinkedIn contacts. On HTC phones using Sense UI, you’ll want to use the People Search app instead of Contacts.

Update 09/27: I just pushed version 1.1.0 to the market last night which should fix a bunch of the Sense UI issues including contacts not showing up in the regular People app.

Proguard, Android, Ant, and 3rd party external JARs

Wednesday, Sep 22. 2010  –  Category: Android, Code, Musings

I’ll keep this short and sweet. Dan Galpin covered in a recent blog post how to drop in Proguard & Ant to easily do Android app builds. One hitch is that it doesn’t work for apps that have third party external jars. The simple fix to get this working is to change the libraryjars line from:

-libraryjars ${libraryjarpath}

to

-libraryjars ${external.libs.dir}:${libraryjarpath}

p.s. why are all the Android dev blogs posted only by Tim Bray and not the authors directly? p.p.s. why can’t we leave comments on the blog posts?

Android UI… fragmentation?

Tuesday, Aug 3. 2010  –  Category: Android, Code, Musings, Rdio

Perhaps fragmentation isn’t the right word… but this issue certainly confuses me.  It seems trendy to throw about the term ‘platform fragmentation’ as it pertains to Android, so I’ll capitalise on that buzzword and go with that for now.  (To be fair, I’d love to be proven wrong and will happily eat my words if someone can point out a better way I should be addressing this).  While developing the Rdio Android app, I’ve been testing on a bunch of different devices and frankly, with generally stock widgets in use, I’m running into the problem where widgets look different on each device.  This wouldn’t be so much an issue, except often times the differences are visual/stylistic tweaks in things like background images or colours which cause our design assets (icons, text colour, etc.) to look bad on one or more devices.

Case in point: TabWidget.  Using a completely stock TabWidget on our app which has minSdkVersion 4 and targetSdkVersion 6, I get the following:

Android 2.2 on Nexus One

Android 2.2 on Nexus One

Android 2.1 + Sense UI on HTC Droid Incredible

Android 2.1 + Sense UI on HTC Droid Incredible

Android 2.1 + Sense UI on HTC Hero

Android 2.1 + Sense UI on HTC Hero

Android 2.1 + Motoblur on Motorola Droid X

Android 2.1 + Motoblur on Motorola Droid X

In each above screenshot, the leftmost tab is selected (i.e. active/current), the centre tab is focused/pressed (i.e. my finger is currently holding it down but I haven’t released it, while the rightmost tab is unselected.

As you can see from the above images, things like the selected and unselected tab icons look fine on the Motoblur and Hero with Sense UI, but look like crap on the Droid Incredible with Sense UI and stock Android on the Nexus One.  Meanwhile text colour looks fine on Motoblur, looks passable on the stock Android, looks mostly awful on the Droid Incredible with Sense UI, and is completely unusable on the Hero with Sense UI.

One option we have available to us is to hardcode all our own widget styles, which means completely skipping the system look and feel.  This is great for the Rdio brand (i.e. we can use our own highlight colours, etc.).. but this is like going back to the days of the 1337 90s when we were all cool kids in college running Litestep, XFCE, GNOME, etc. and only apps with custom themes and skins.  At some point it gets old, we grow up, and we want apps that match the system styles.  I don’t mind mobile apps having their unique personality, but I don’t want widgets having their own custom look and feel.  I want a ListView in one Android app to look and behave like ListViews in other Android apps.  Ditto that for TabWidgets, Buttons, etc.

But how are we supposed to do that if there isn’t a standard widget style we can rely on?  Am I just missing something painfully obvious about system-wide styles I should be using?  And what about custom widgets?  For example, in the above screenshots, each album art is clickable and relies on a “button” like look and feel to it… but buttons on stock Android use orange focus/select/press states, while on Sense UI they use green, and on Motoblur they use red.  We need to make custom graphics (in this case a 9patch drawable) for this, so are we expected to make one version for every vendor?

What are other Android developers doing to get around these annoying vendor-specific extensions and styles to the Android UI?


Recent posts