By trade I’m an ASP.Net / C# developer. I spend most of the working week inside Visual Studio. Occasionally I get old skool and bust out SQL Server Management Studio in order to bother some data more directly. It wasn’t always like that however. In the past I’ve worked with PHP, and a long time ago I spent most of my time plugging away in classic ASP’s VBScript. A few times I’ve even been known to do some Java. Well, just enough to be dangerous, as they say.
I own an Android phone, so rather than go down the more natural Windows Phone development route, I thought I’d dust off my Java skills (a very careful dusting as they’re somewhat fragile) and write an Android app.
What is it?
That’s a good question. I know what it is now and I’ll tell you shortly, but when I set out to make an app I didn’t really have anything particular in mind. I certainly didn’t have some inspired cash-cow at the ready. So I sat down and tried to figure out what I wanted to do. It seemed to me that I had two main goals for the app:
- It had to be fairly simple so I wouldn’t get bogged down in complexity on my first attempt.
- It had to be somewhat silly.
The second point was largely to differentiate it from my day job. Not that the day job isn’t fun sometimes, but if I was going to motivate myself to finish this in what little spare time I have, I had to hang my serious hat up as soon as I got back to my flat.
At first I thought it would be funny to make something slightly hostile. I had the idea of an app that purports to help people find lost keys, but which actually berates them for losing them in the first place. Then I realised I was being a dick, so I didn’t do that. The idea of of an app to find keys was good though. The only problem was, as a practical app it was quite impossible.
After talking with a friend I began to like the idea of making a choose your own adventure sort of experience behind the pretence of an app that can find keys might be fun. This ticked an extra box with me as it would allow me to not only write an app, but also write some fiction, albeit in a format I’ve little experience writing. That side of it would prove to be more work than anticipated, which I’ve covered in a separate blog post.
Where are my fucking keys?
That was the working title for the app. At the time I thought it was funny, but at the back of my mind I realised it probably wouldn’t survive into the app store. So now it is known less offensively as Sheepless Key Finder. The sheepless part does have relevance to what thinly passes as narrative in the app.
It’s fair to say that the app took longer to write than I initially thought. Some of that was how much planning and writing the adventury bit needed. The rest was at first simply getting stuck on implementation, but later it turned out I have quite a flair for scope creep. There was always another little bit I wanted to add. But eventually it was done.
Was it worth it?
It was never going to make me rich so the only measure of its success I have is whether I feel it was worthwhile taking the time and effort to write it. Well, I’m happy to say that yes, it was. I’ve learned how to write a fairly basic Android app, but in doing so I now have a good appreciation of how to use the framework and would feel quite confident about writing another, completely different app. I may go into the technical details in another blog post, but I’d like to summarise a few points here in conclusion:
- Java, while similar to C#, is not C#. I knew this before of course, but also, shhhhh – it’s not that different to C# really.
- The Android framework is pretty well thought out, with Activities naturally separating concerns without too much effort.
- I still don’t like Eclipse as much as Visual Studio, but debugging worked well enough for me.
- The Dalvik VM was horrifically slow when I first started, but after an update it’s much, much faster. The VM management is also quite nice to use. It was easy to make a range of VMs covering different screen sizes and densities.
- Debugging on my phone itself was a doddle. I was expecting to have to jump through many hoops to get it working, but essentially all I had to do was plug my phone in and pick it as a target when debugging. Lovely!
- That said I did have one annoying issue where a VM got screwed up and had to be deleted. Grrr.
- Signing the app is actually very straightforward, but one crucial step is a bit ambiguous and caused me some strife.
- Actually running the finished app on my phone felt nice.
You can download the app Google Play. It’s free!
Here’s a sheep wearing a hat: