Saturday 18 December 2010

Screenshot time

I've got the app to a certain point. The basics all work: it now handles a database of saved locations. I thought this would be a good time to blog with some very early screenshots. I should point out that the gui is only at "functional" level: it needs to be made pretty at some point.


Tuesday 14 December 2010

Lack of provision

or
What To Do When getProviders Returns An Empty List

I rearranged some stuff recently, and afterwards, the app broke. After some digging, I discovered that it was because getProviders, which is supposed to give me a list of the types of location providers present on the device (gps, network, and so on), was returning an empty list. I ran to Google, which has very much been my friend throughout this, and discovered pretty much everyone saying it was because the permissions were not set.
But that can't be the case for me! It worked a couple of days ago!
So I faffed, looking into what other things it could be, but it pretty much all came back to that. So I checked my AndroidManifest.xml, and sure enough, there were the lines:
<uses-permission android:name="android.permission.INTERNET">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION">
</uses-permission></uses-permission>
So it can't be that. So I faffed a bit more. Eventually, I looked back at the commits since it worked. Oooh. There was one on the AndroidManifest.xml. That's suspicious. "Whitespace cleanup" you say? Well, nearly. Actually, I'd moved the permissions from outside to inside the <application>, where they're useless. So I moved them back, and all is well.
I'm blogging about it mostly because I swore I would, having dug so deep into the internet, and not found the solution to my particular problem, I wanted to post it for others to benefit from. So if you're reading this and you think the obvious problem doesn't apply to you, it probably does.
One beneficial side-effect was my discovery and first usage of Log.wtf, which, naturally, stands for "What a Terrible Failure".

Saturday 6 November 2010

Next stop, DB/UI

Just a blog post to keep me thinking about things.
So I've got the basic functionality working, and I've actually used it "in anger" (i.e. I've got it to alert me when I'm approaching my destination). Naturally, once I've set it, I remember to get off the train anyway, but that's not the point. Interestingly, and surprisingly for me, I find getting it to find the location from the network the best. It uses very little battery (compared to GPS), and is reliable enough to detected location to within 1.5km or so (which is usually all that the app needs).
But now I've got to the stage where there is one thing missing: usability. This separates off into three things.

  1. It needs a database of previously saved locations, so you don't have to find the location every time (which can take 10-15 minutes, if the data connection is bad).
  2. It needs a UI which works the way people expect it to, rather than the way I threw things together to begin with.
  3. The alarm needs to be more configurable. At the moment it just sets off the default alert whenever the location changes to something within the specified radius.
I'm starting at the top and working down. Thanks to Another Android Blog, I've got a database installed in my app and working, but at the moment not actually storing any useful information. I think the next point of call will be the UI: I can't start storing / using multiple database entries without a complete change to the UI, so that's what's coming next. When I get round to it.

Incidentally, I don't know if this is the way these things are generally done, but I find that actually using my app on a semi-regular basis for what it's intended has kept me looking for the most important things to improve about it. I don't think the app would ever come about if it wasn't something I actually used. 

Sunday 29 August 2010

Monetizing and Open Source

I would love to be able to go part time at my (currently full time) work and spend more time doing Android dev, but to do that I'll need to be making something out of it. Long term, I'm thinking about the monetization of Wake Me At and other Android development that I do.
There seem to be three options:
  1. Charge for the app
  2. Put ads on the app
  3. Ask for donations
The problem is, I'm a bit of an open source advocate. If we assume that everyone in the world is bad, and they are going to do their very best to get something without paying for it, then 1 and 2 are a problem. I can charge for the app, but then someone could just download the source code and get it for free. Likewise, they can download the source code, and remove the ads. Asking for donations is the only evil-proof source, but then the evil people just won't pay.

But I think people are both lazy and not evil. I think, I hope, that if I were to charge 99p for an app, it's not worth their while to go and download the source, compile, etc. Hopefully at least some of them will do it purely to support my work. Likewise, and possibly even more so, with ads (though I hate ads, as a general rule): hacking into the code to remove the ads won't be easy for non-programmers. I wonder if the source of the ad hooks will even be open-sourcable... it might have private information in it (though I would think that's unlikely).
Anyway, this is just me thinking out loud. All thoughts gratefully received.

Project One: Wake Me At

I realized (thanks to zabdiel's comment on my first post) that I hadn't actually posted on what my first Android app was going to be (assuming you don't count my funky live wallpaper: maybe I'll put that up here some day, might be useful to someone).

It's intended for train travellers (but could have other uses). It's intended to be the electronic equivalent of hanging a sign round your neck saying "Please wake me when we get to Nuneaton", but getting your phone to wake you with an audible (or otherwise) alarm, using its GPS or other location services.

There appear to be apps like this for the iPhone, but I'm deliberately not investigating too much: I'm going to do it anyway as an exercise in learning Android developing, and if it's very different to the other available apps it might stand more of a chance of getting noticed.

Code can be found here:
   http://github.com/spookypeanut/Wake-Me-At

Current state of the app is that you can click a button, and it pops up a map with your current location marked with a (rather too large) X. Still very early days!

Sunday 22 August 2010

It begins (a little late)

I felt I should have a blog about my android development, so here it is. When I created it, a few weeks ago, I thought Android development was going to be very quick and straightforward: it probably would be, but my Java is *very* rusty, and I'm rapidly coming to the conclusion that I don't learn new languages / apis / tools as easily as some. I'll get there, but it's gonna take me longer than I had hoped. Anyway, in the meantime, here's a link to the github repository of my first app, in case you want to follow my (slow) progress.

http://github.com/spookypeanut/Wake-Me-At