Thursday, 22 April 2010

Force Closes And Android

A fun little story about android development.

I recently updated my most popular android app. It is not that popular in the grand scheme of apps out there but it is my most popular one. When you update you usually get a spike of people using you app as people who have not used it in a while return to see what has improved. It usually settles down after a couple of day back to what was before the update in terms of sessions per day.

This update was different. After the 3 day spike things settled down to about 20% less than what they were before the update. Strange but I could not figure out why this might be. The number of installations had not really changed, people where just using it less.

One thing I added in the update was Flurry and this is able to give you some details about the number of hangs I was getting. It was 2% of all sessions resulted in a hang. This is very high (well I think so anyway) but without and historical data for my app I have not idea if this was high or lower than before the update.

The reason I add Flurry was to actually get some details on how many hangs I get.

So I am just about to embark on a code review of swathes of code as by default Flurry does not give you much to go on when a user emails to say he is getting Force hangs when he deletes stuff. I am quickly able to track down his problem and produce a fix and release an update.

The bug in the deletion code had been there a while. This got me thinking as in this update I had improved the UI and made deletions much easier to find. Previously you had to press and hold over an item to get the menu with the delete options. In this version I had added a really obvious delete button. Where users suddenly discovering the delete functionality thus causing more hangs. These hangs were cause the main data store to become corrupt so they could not use the app?

So effectively heavy user are being removed from my pool of users as they are the ones most likely to delete stuff and get locked out. Little wonder I was seeing a reduced number of sessions.

Of course most of this is just theory and time will tell if this was the case, as users get the next update that fixes the problem and lets users back in.

Even if my theories about the drop in sessions are wrong I have a few take away ideas from this.

  • Never and I mean never allow corrupt data to stop you program from running. Validate everything you write to your save data. Validate on the way in if there is a chance a user can fiddle with the file. User not being able to run you app is a bad thing! Pretty obvious really
  • Press and hold on mobile phones is not intuitive and only a few people find it accidentally. It is possible this will change in the coming years as people become more used to the idea. For now provide different ways for them to accomplish any task. That or provide a good manual along with lots of you tube video containing how to. In fact in the mobile world you tube is probably better than manuals. Most people don't use a manual for an app on a mobile they expect to be able to figure it out. They are however more likely to watch a 5 minute video about the app.

No comments:

Post a Comment