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?

As I recently blogged, I just started working at Rdio. Specifically I’m working on the Android app. A fair amount of code is shared between our Android & Blackberry app (since they both use a common platform of Java). Since I’ve been making changes to the Android code, I wanted to be able to build the Blackberry app to make sure I didn’t regress or break anything there.

I’ve got a shiny new MacBook Pro, and well… it just feels like sacrilege to be running Windows on this thing. So I set out to see if I could get the latest Blackberry SDK working on OS X. And… well, it works! Requisite screenshot:

blackberry

I owe a huge amount to this blog post, which I used and simply updated and hacked around with the latest rev of the SDK… I can’t claim much creativity for my steps since it’s clearly a derivative of azizuysal’s work.

Downloads

SDK & ant Setup

  1. Install Eclipse wherever.  It doesn’t matter where.
  2. Create a Blackberry directory for your Eclipse workspace and to hold the SDK.  I used /Users/stevel/ws/Blackberry.
  3. Launch Eclipse and specify that directory (/Users/stevel/ws/Blackberry) as your workspace directory.
  4. Launch a terminal and do the following:
    1. mkdir $HOME/ws/Blackberry/SDK
    2. cd /tmp
    3. unzip $HOME/Downloads/mpp-sdk-1185.zip mpp-sdk/osx/preverify/preverify
      unzip mpp-sdk-1185.zip mpp-sdk/osx/preverify/preverify
    4. unzip $HOME/Downloads/BlackBerryJDEPluginFull1.1.2.201004161203-16.exe
      1. (this will create two directories: InstallerData & Windows)
    5. unzip InstallerData/Disk1/InstData/Resource1.zip “C/ABS10/Components/EclipsePlugin/1.1.2/EclipsePlugin/installer/InstallAnywhere/InstallerData/EJDE\ Plugins1ae15a8ca04czgiasf.jar”
      1. (this will create a retardedly long subdirectory path, as you can see)
    6. unzip C/ABS10/Components/EclipsePlugin/1.1.2/EclipsePlugin/installer/InstallAnywhere/InstallerData/EJDE\ Plugins1ae15a8ca04czgiasf.jar
      1. (this will create two subdirectories: features & plugins)
    7. rm -rf C_ InstallerData Windows features
    8. cd $HOME/ws/Blackberry/SDK
    9. mkdir net.rim.ejde.componentpack5.0.05.0.0.25
    10. cd net.rim.ejde.componentpack5.0.05.0.0.25
    11. unzip /tmp/plugins/net.rim.ejde.componentpack5.0.05.0.0.25.jar
    12. mv /tmp/mpp-sdk/osx/preverify/preverify components/bin
    13. chmod +x components/bin/preverify
    14. cd ..
    15. mkdir bb-ant-tools-1.2.8-bin
    16. cd bb-ant-tools-1.2.8-bin
    17. unzip $HOME/Downloads/bb-ant-tools-1.2.8-bin.zip
    18. rm -rf /tmp/plugins /tmp/mpp-sdk
  5. Now go back to Eclipse, and go to the Eclipse>Preferences menu
  6. Go to Java>Build Path>User Libraries and click New
    1. Enter “Blackberry 1.1.2″ as the library name.
    2. Click Add Jars and select $HOME/ws/Blackberry/SDK/net.rim.ejde.componentpack5.0.05.0.0.25/components/lib/netrimapi.jar
    3. Then select Javadoc location and choose the $HOME/ws/Blackberry/SDK/net.rim.ejde.componentpack5.0.05.0.0.25/components/docs/api directory
  7. Go to Ant>Runtime in the Eclipse preferences
    1. Under Global Entries, click Add External Jars
    2. Choose $HOME/ws/Blackberry/bb-ant-tools-1.2.8-bin/bb-ant-tools.jar
  8. Click Okay and save the Preferences
  9. Add $HOME/ws/Blackberry/SDK/net.rim.ejde.componentpack5.0.05.0.0.25/components/bin to your PATH via your .bashrc file

Building Hello World

  1. Follow the exact steps (heck, use his sample code) in the blog I linked to above.  It works perfectly.
  2. Only hitch is make sure to update the jde.home & simulator.home properties in your build.xml to the right paths of course.

Running the Simulator

  1. Call me nuts, but I didn’t feel like install MacPorts.  Instead, I built my own Wine from source.  To do this, just follow the instructions here.  I installed it to /usr/local.
  2. Grab winetricks and put it somewhere in your path (curl http://www.kegel.com/wine/winetricks > $HOME/bin/winetricks)
  3. Install various winetricks packages:
    1. gdiplus msxml3 msxml4 msxml6
    2. (yes really, I had to install all 3 for some reason.  I have no idea why)
  4. cd $HOME/ws/Blackberry/SDK/net.rim.ejde.componentpack5.0.0_5.0.0.25/components/simulator
  5. cat 9550.bat | sed -e ’s/^M//’ > 9550.sh
    1. note the ^M isn’t a literal ^M, it’s the ctrl code for <Return>, hit Ctrl-V and then the Return key to generate it.
  6. Edit the 9550.sh file and make it look like:
    1. #!/bin/sh
    2. cd “dirname $0
    3. /usr/local/bin/wine fledge.exe /app=Jvm.dll /handheld=9550 /session=9550 /app-param=DisableRegistration /app-param=JvmAlxConfigFile:9550.xml /data-port=0×4d44 /data-port=0×4d4e /pin=0×2100000A
  7. Fixup the 9550.xml file
  1. cat 9550.xml | sed -e ’s/^M//’ > /tmp/foo
  2. mv /tmp/foo 9550.xml
  • chmod +x 9550.sh
  • ./9550.sh
  • You’re done!  You can load your .cod files by using the File>Load Java Program menu in the simulator
    1. OBAI

      Thursday, May 13. 2010  –  Category: Musings, Songbird

      rockhorns

      I’m leaving Songbird.

      It’s been a blast, and I’ve loved working here.  I think Songbird is in a great position now, what with the Philips partnership, and the upcoming partnerships that are in the pipeline waiting to be announced.  It’s hugely gratifying to be able to walk into Target, pick up a Philips MP3 player and see the Songbird logo on the back.  It is partly because of where Songbird is now that I feel comfortable leaving, knowing it’s in the capable hands of all the birders involved.  I’ll continue to follow Songbird’s progress with a fond eye and a tuned ear.

      I wish the Songbird and Mozilla communities all the best, and hope that I can still be involved in both.  I think the Mozilla community is amazing, truly one of a kind, and it’s been really awesome to have the chance to work and be involved with it.

      So what’s up for me next?  I’m finishing up my work on the servicepane until the end of the month, and then I’m off to go join Rdio… obviously the music bug has bit me.

      new servicepane!

      Thursday, May 6. 2010  –  Category: Songbird

      My project for the last month or so has been implementing the new servicepane for Songbird: Picture 1Our old tree-based widget was horribly inflexible for… well pretty much anything.  Our new binding uses XUL elements to build up a much better looking widget (IMHO).  We’ve now divided top level nodes into groups, collapsible by clicking on the group headers (with bonus whizzy animation to boot!).  We’ve also made badges, and an API for adding them which should allow add-ons to have nice count badges like the Concerts & New Releases add-ons do above.  The badge API will also allow you to have arbitrary image badges, which is how we implement the eject button for devices.

      Perhaps the best part of the new servicepane is the fact that it’s all just XUL elements and widgets, which means you can get your node, and tweak it via JS as much as you like (within reason).  Additionally, since all the styling is just CSS, Featherers have a lot more flexibility to change the layout and style the way the servicepane looks now.

      It’s in trunk now so should be in tonight’s nightly builds.

      Media View Toggle Buttons

      Tuesday, Feb 2. 2010  –  Category: Songbird

      Picture 3One of the things implemented in Purple Rain (the new Feather in Songbird 1.4) was direct toggle buttons to select the current Media View.  However, we only implemented them for the built in List View & Filter View buttons.  Third party Media Views were still only listed in the arrow-drop-down menu button next to them.  I’m happy to say that we’ve landed bug 18538 on trunk yesterday which will allow Media View developers to create and define icons to represent their Media View.  They will be automatically inserted into the row of buttons to allow users to more easily switch to the available views.

      All the Media View developer needs to do is create an icon file.  It must be 22×80, with all four 22×20 states (normal, hover, active, and disabled) vertically stacked in it.  Here’s a sample one I created for John M’s excellent Grid View:

      mpIconAll that’s left is to point to it inside the Media View’s install.rdf file.  In the same <songbird:mediaPage> section we simply define a new <songbird:contentIcon> value, like so:

      <songbird:mediaPage>
         <Description>
              <songbird:contentIcon>chrome://gridview/skin/mpIcon.png</songbird:contentIcon>
              <songbird:contentTitle>Grid View</songbird:contentTitle>
              <songbird:contentUrl>chrome://gridview/content/media-page.xul</songbird:contentUrl>
          </Description>
      </songbird:mediaPage>

      That’s all there is to it!

      Updated locations for Concerts

      Monday, Feb 1. 2010  –  Category: Songbird

      Picture 2

      I just committed an encoding fix for Songbird’s Concerts add-on that, starting with tonight’s nightlies on trunk, should mean you start seeing some updated European countries in the available locations list.  The new countries include Denmark, Finland, France, Germany, Netherlands, Norway, Spain, and Sweden.

      While the concert data is now being included, not all localisations are up to date.  Notably, out of that list, we’re missing the Danish, Finnish, Dutch, and Norwegian localisations entirely.  The Swedish localisation just needs a few more strings translated.

      If you’d like to help out and see the full localised Concerts add-on in all its glory, please go register with Babelzilla.org and help translate the Concerts add-on here.

      Philips & Songbird

      Friday, Jan 8. 2010  –  Category: OpenSource, Songbird

      By now you’ve seen the news about our partnership with Philips.  Big chunks of the team have been cranking pretty hard on this partner release and we’re super excited to ship some things we’ve been working on for a while, and to get Songbird into the hands of even more users. The feedback has already been tremendous; thanks to everyone for your support!

      As you know we’re big believers in openness and as such we try to share our development plans and progress with you as regularly and freely as we can. This isn’t as straightforward when other companies are involved — especially large, global, public companies like Philips. So we apologise for not being able to talk openly, sooner, about this new relationship but we hope, even as a bit of a surprise, you can appreciate why this is a good thing for the company, the products, the platform, and all of our users. As always we’ll strive to give you an early heads up whenever we can.

      While there’s obviously some special work we’ll do for Philips, we don’t think about this as one-off work.  Much of what we do for them, is work we’ve been planning  to do for all Songbird consumers.  For Philips, there’s certainly a custom feather and the add-ons that are important to them and their customers. We’re working to make sure that all of what we build is valueable for you and for partners … with as few exceptions as possible.

      Our partnership with Philips is a great step for us — it drives distribution, revenue, and an even tighter connection to the CE side of the world. Of course the partnership means more features to consider and tradeoffs to balance – but in this case, that’s a great problem to have.  There is lots of overlap in desired features from both sides, so this probably means you’ll see some things accelerated, which is good news for all Songbird consumers. We know that users around the globe using the software and sending us their ideas ultimately results in a better experience for everyone. So keep your suggestions coming.

      There’s no resting on this week’s milestone achievement, we’re working fast and furiously on the next release, which will hit early this year. Stay tuned for more as we move continue evolving plans and working through development.

      Thanks again for all of your support!

      the post-release post

      Monday, Jan 4. 2010  –  Category: Songbird

      welcome to my post-1.4.1 1.4.2 1.4.3 post… where i talk about things you talked about after we talked about launching 1.4.3 (after our couple of respins) last week.

      we’ve been following the blog comments, reading the bug reports, and getting the feedback from GetSatisfaction bubbled up to us via our intrepid Songbird Champs.  there have been a few recurring issues worth mentioning/recapping, so here we go in no particular order:

      1. Windows 7 Support
        • Yes, we throw a warning message up when you’re installing Songbird regarding it being unsupported on Windows 7.  This is mostly a “caveat emptor” warning, we haven’t done full and proper QA test runs to ensure things work on Windows 7.  That being said, we have plenty of users who run it just fine on Windows 7.  If you do continue to install and run it on Windows 7, you may experience bugs.  We’re working on full and proper Windows 7 support for the next release if you want to wait.
      2. iPod Support
        • As mentioned previously, we are no longer maintaining the iPod Extension.  Continually playing an unsupported game of catchup with Apple sucked, and we’ve opted to go with iTunes Import/Export Syncing as our supported way of having users sync their music libraries with Songbird.  As mentioned in that blog post, we’ve open sourced the iPod Extension (which is built on libgpod), and would happily welcome any community patches to it.
      3. Splash Screen
        • Yeah, we get it.  Some of you don’t like the splash screen.  Unfortunately it does, believe it or not, serve a purpose.  Not everyone has the super-latest-OMFG-ITS-1BILLION-TERAHERTZ machine… and especially on some platforms (Windows XP for instance), there was no feedback as to when the application was starting.  If you really really really hate the splash screen that much, then go grab Simon’s splish splosh extension to easily change or disable the splash screen.
      4. Bookmarks
        • Over the next few releases you’ll see us phase out some of the more web browser specific features.  This is a conscious design decision to differentiate Songbird as more of a media player than a web browser.  Let’s face it, we’ll never be a better web browser than Firefox, Safari, or Chrome.  We’ve never intended for Songbird to replace your daily web browser.  Don’t take this to mean we’re removing the web browser component entirely… we can’t, and we won’t since we use this for rendering things like the Last.fm Radio Directory, the 7Digital Music Store, the Concerts Listings page, etc.  It just means we’d prefer for add-ons to take a more integrated approach along the lines of the 7Digital, Concerts, SHOUTcast, & Last.fm add-ons where servicepane nodes are displayed that link to custom chrome (or heck even to webpages tailored specifically for Songbird, such as the 7Digital store).
        • That being said, if you really really really want your bookmarks back, I’ve made a Songbird Bookmarks extension that re-enables the bookmarks servicepane node so you can get your old bookmarks back.
      5. Automatic Album Art Fetching
        • One of the new features in Songbird 1.4.3 is automatic album art fetching.  Depending on what mode you have album art in (either “Now Playing” or “Now Selected”), album art will be automatically fetched for the currently playing or selected track.  If you’re on a slow or high latency connection (and this can vary depending on your album art fetcher add-ons and priorities, set via the Album Art preferences), you may experience a lag when selecting or playing tracks as Songbird goes to fetch the album art.  We’ll work on improving the performance of this in the future, but for now – I’ve made an extension to allow you disable or enable this automatic fetching behaviour.

      AIDS Ride, first official training ride down

      Sunday, Jan 3. 2010  –  Category: Outdoors

      I went on my first official AIDS Ride training ride yesterday… a “Category 1″ (the slowest pace group, average speed of 7-8mph) training ride leaving Orinda, and lasting 24 miles.  Turns out it was a bit slow for my pace, and I ended up riding in a breakaway pack that was riding up front.  I’ll try the Category 2 ride next week instead (11-15mph) which should be more my style I think.

      In other news, I’ve managed to raise $2320 so far!  Only $680 left to go to meet my goal of raising $3000 for the San Francisco AIDS Foundation.  Surely one of your New Years’ resolutions was to donate to stevel’s 545 mile bike ride from SF to LA, right?  If not, hopefully one of your resolutions involved donating to charity?  ;-)   In any case, if you haven’t donated yet, I (and the SF AIDS Foundation) would really appreciate your donation and support

      Office rodent infestation

      Friday, Dec 18. 2009  –  Category: Photos, Songbird

      Sorry, I know I said we’d have Songbird 1.4.1 out this week – but we’re pushing it back to Monday due to:

      • A few bugs caught by awesome Songbird users found in the beta release we pushed on Wednesday
      • An office mouse infestation Ali discovered
      Mice! Oh my!

      Mice! Oh my!


      Recent posts