Danwms.co.uk
  • Home
  • Blog
  • Android Development
    • LFC History >
      • Change Log
      • Privacy Policy
    • My Scrobbles >
      • Change Log
      • Privacy Policy MS
    • Lay Bet Calc >
      • Change Log
      • PrivacyPolicyLBC
    • Archived Apps
  • Wearables
  • Other Dev Stuff
  • About

MyScrobbles released for Android

27/12/2012

0 Comments

 
Picture
The first release of the MyScrobbles application has now been released to Google Play.
My Scrobbles is a quick and easy way to  to browse yours and your friends LastFM listening history. You simply log in with your Last fm details and then all of your Scrobbles are displayed. 

  • Your recent scrobbles are shown in real time and it is possible to browse all the way back to your first ever scrobbled track.
  • View your artist charts filtered by week, month or all time.
  • View your track charts filtered by week, month or all time.
  • View your friends music history including 'listening now' notifications.

0 Comments

Xperia devices do not work well with SherlockActionBar

5/12/2012

0 Comments

 
Picture
I recently made a major update to my LFCHistory Android app. Most of the work involved replacing the current UI to use SherlockActionBar. I spent a couple of weeks working on the changes and tested them on a Galaxy Nexus, Nexus 7 and Nexus 10. Everything was looking fine so I decided to release the application to Google Play.

After several hours and a number of people started updating to the latest version of the app I started to get a lot off error alerts from my ACRA Crash reporting. All of them were from Xperia (SEMC) devices failing to open up the first activity.

Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f0c0059 at android.content.res.Resources.getValue(Resources.java:896) at android.content.res.Resources.getDrawable(Resources.java:584) at android.widget.AbsListView.setFastScrollThumb(AbsListView.java:794) at android.widget.AbsListView.setFastScrollEnabled(AbsListView.java:740) at android.widget.AbsListView.<init>(AbsListView.java:670) at android.widget.ListView.<init>(ListView.java:167) at android.widget.ListView.<init>(ListView.java:163)

It turns out that the resource ID used for the ListView scroller does not exist within the Xperia rom, which means as soon as the LisView tries to load the exception is thrown and the app fails.

At first I fixed this by setting: android:fastScrollEnabled=”false”

<ListView
android:id="@+id/lv"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fadingEdge="vertical"
android:fastScrollEnabled="false"
android:scrollbars="vertical" />



This fixed the issue but then meant that all the other users without Xperia devices were now missing out on functionality (The app contains some large lists which can take a long time to move through without fast scroll being enabled). To fix this I decided to do a check in the code to see if the device being used was an Xperia, if it was not then the fast scroll can be enabled. e.g.

if (!android.os.Build.BRAND.equalsIgnoreCase("SEMC")) {
            listView.setFastScrollEnabled(true);
        }



This means that for everyone apart from Xperia users the fast scroll will now work.

Note, the fast scrolling used to work on Xperia devices before I made the changes to work with ActionBarSherlock.

0 Comments

    Me

    I am a Liverpool supporting software developer originally from North Wales, now living  and working in Manchester.

    Archives

    May 2019
    August 2018
    January 2015
    December 2014
    November 2014
    September 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    June 2013
    April 2013
    March 2013
    December 2012
    November 2012
    October 2012
    September 2012
    August 2012
    July 2012
    June 2012
    March 2012
    October 2011
    August 2011

    Categories

    All
    Android
    Bitcoin
    BitcoinTracker
    Development
    Fancenter
    Fbdelete
    Fitbit
    Lfc
    Lfchistory
    Myscrobbles
    Personal
    Photoshop
    Vdjlastfmscrobbler

    View my profile on LinkedIn

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Home
  • Blog
  • Android Development
    • LFC History >
      • Change Log
      • Privacy Policy
    • My Scrobbles >
      • Change Log
      • Privacy Policy MS
    • Lay Bet Calc >
      • Change Log
      • PrivacyPolicyLBC
    • Archived Apps
  • Wearables
  • Other Dev Stuff
  • About