Friday, January 27, 2012

writing my Strava app: part 1

The first step in writing my Strava app was to make a note of exactly what I wanted it to do. Well, perhaps not exactly: I don't know the capabilities yet of the Strava API. In particular, does the Strava API allow you to replace the data on a ride? Apparently it does, since StravaHaHa allows modification of ride data. Honestly I don't know where the API is documented, but I am deferring that until later. No rush.

So then when I knew what I wanted the program to do, I set out to design some pages. So I measured the screen on my HTC Incredible phone and found it was 5 cm wide by 8 cm high. So I set up an image file using GIMP with 500 pixels wide by 800 pixels high, and for each screen, began "sketching out" how I wanted the page to look. It's different assembling a page from a widget tool kit, so details aren't critical here: I just the look and feel of each page.

When I got tired of doing that, and I was on-line, I started downloading some of the stuff I want for writing the app. For example, this tutorial page provides some nice guidance. First I went to upload my Ubuntu version on my laptop, but my CD player is being cranky, and I can't get the installation CD (written from my work machine: shhh!) to run. Hmm... I'm not going to invest any money in this laptop, however, as it's from 2007: ancient. Instead I think I'm ready to dip my toes in an Apple's OS/X. I'll work on that...

The tutorial recommends Eclipse as a development platform. An alternative is to use a simple text editor. But that seems so old-school: better to use a proper development environment. So I'm just finishing up downloading Eclipse now.

Next I need to download the Java Development Kit. Android apps can be written in C, but Java is more common, and I should follow the best practice. I really like Java, as I noted. But it's been quite a long time since I've done any Java coding.

So time for a Java tutorial. That's easy: Oracle (formerly Sun) has some nice tutorials. So I'm going through those now.

A lot needs to come together for this to work. Honestly I'm not sure I'm going to make my deadline. But I need to stick to it, and by writing here my intent puts some pressure on me to make it work. If I can, I'll feel pretty good about it.

added: Sure enough, Eclipse crashed and burned on my system, which is Ubuntu 9.04: it states it requires 10.04 at least. Hopefully I can get my CD drive working so I can install 11.10. Otherwise I need to wait for that Apple.


jpo said...

Strava API documentation is here and here, in case you haven't found it yet. Good luck with your app!

djconnel said...

Thanks! I had known about that... may end up doing web page before app at this point, now that I know more about what's involved in app design! Goal is to share as much code as possible.