torsdag 28 januari 2010

Force Close and STHLM Traveling

I'm really sorry that the latest release of STHLM Traveling has caused a force close when starting the application on some devices.

This is actually a bug in Android that I and many others got to learn about the hard way. This is the short background of why some user is getting a force close. When uploading a application to Android Market you have the choice to enable copy protection for the application. I once activated this and recently removed it. What I did not know was that when the application has a database or writes files to disk something goes wrong and causes a force close on start up when switching the copy protection setting. The only solution to this problem is to first uninstall and then install the application again. Another downside off this is that you loose all saved data. From what I have understand the force close issue only affects devices that runs Android 1.5.

While fiddling around with this copy protection setting I also noticed that some phone models and carriers did not list copy protected application in Android Market, this is also discussed in the Android developer group.

Once again I'm really sorry about all this. I hope it will not happen again.

But now to something slightly more fun, the latest release of STHLM Traveling. I added a Swedish translation with great help by Jean Diarbakerli that did all the hard work with the translation. The application will automatically choose Swedish if you have selected this in the Android settings. Unfortunately Android does not have a official Swedish translation but some roms support this for example HTC Sense. For the rest off us we need to go to the settings menu in the STHLM Traveling and set the preferred language there. I also added history and shortcuts for departures.

I would also like to thank all of you that has sent me crash reports, it has helped me a lot when trying to make this application as stable as possible.

Get the latest version of STHLM Traveling from Android Market.

lördag 5 december 2009


Last weekend I participated in the first GTUG Stockholm Android Hackathon in Sweden hosted by Bwin Games. A part from all the hacking there was also two great presentations by Dirk Groten, CTO from Layar and Johan Burell all organized by Peter Svensson, Peter also did a great write up of the event at his blog.

Before the hackathon me and my other team mates Albert Ramstedt, Joakim Kolsjö and Joakim Bodin had an idea to build something on top of the data from, the site it self scrapes the Swedish police departments website for crimes committed in Stockholm. I contacted Pär Thernström to ask if it was possible for him to provide us with a simple API. Pär was really nice and created the API just a couple of days after I first contacted him.

Once we had the API, we had a short meeting to discuss what to build during the hackathon. First we thought of building a application that just listed recently committed crimes and show them on a map. But we thought that was kinda boring instead we come up with the idea to create a game.

The game we decided to build is sort of a geocaching game. We plotted all the crime sites on a map and showed the players position on it. The player can then start the game at any time by pressing a start button. To get points the player need to visit as many crime sites as possible during a fixed time. For each visited site the player earned 10 points and the possibility to see which type of crime that was committed at that place. Players that dare to visit areas with a high crime rate will probably get more points.

Here is a short screen cast demonstrating CrimeSweeper. Crime sites are listed as stars on the map.

So will CrimeSweeper be released on Android Market? Not sure, first of we probably need to rewrite it to use a service for the game logic. This to be able to track movements and hits even if the player is doing something else with the phone. It would also be fun to extend it to not only use crime sites, perhaps a map with tourist points would be nice as well? And of course a high score list. Anyway the source is at GitHub if anyone feel to hack around with it.

I really love hackathons it is truly amazing to see what people manage to build during just a couple of hours. This was the second hackathon I participated in. Last time was in Amsterdam at Hyves HQ. Me, Joakim Bodin and Johan Mjönes then built a Android app called Mystery Hangout. If you are interested you can find the source and a video demonstrating it at GitHub.