Current Projects

Google Application Engine

I have been playing around with the Java version of the Google App Engine. I got user access ages ago but didn’t have the time or an idea of how I would use it.

Since then I have written a few Android applications and from quite a few of the comments on my traffic application I can see that it would be a nice idea to provide a service in the ‘cloud’ which:

The main reason for this is that my isp is just a simple provider. There is no Tomcat server or anything like that. I could write a CGI script to process data which is sitting in xml files (say) but that won’t be fast enough really.

Looking at what the App Engine provides it should be possible to write a service which presents a number of servlets which deal with such requests.

So, I have been working on an application which downloads the HA traffic RSS data and dishes up data according to the users gps position. In fact I have this working but I want to present the code so anyone else can learn from it. To that end I have been writing some GWT code for what must the first time in two years. I can’t believe it’s been so long. I recently went on to the GWT forum and was amazed that some of the same people are still there. That used to be my haunt de jour until I went off on a tangent into writing Flex applications. The code is coming together but as usual I have got obsessed over making minor details perfect. This kind of attitude is both a blessing and a curse as any developer will tell you. The devil is in the details but sometime you just want something to work. I have noticed though that the stuff which gets attention tend to have some polish on it so I would always say it’s worthwhile as long as it doesn’t go on forever.

The ultimate aim is to write an Android application which uses this data.

Palm Pre Mojo Debugger

I can’t think of a project in recent memory which I have spent so much time on and then abandoned. Yet, it would be a shame to completely ditch it. I spent about two months of lunchtimes and weekends intensively developing this and now I seem to have hit a brick wall.

What am I going to do with this code? It uses the Mojo SDK jars so I can’t put it up on Google Code without a lot of explanation and I am worried that I won’t find any Java developers within the Palm Pre community who have the ‘chops’ to get their heads around it and make the necessary improvements like parsing the GDB output. The next steps need some hardcore skills which I don’t have the time or inclanation to get into. It would make an ideal project for a CS student.

So that’s it. That’s the current state of play. I find myself slowing down a bit because I am taking on bigger projects and they take time to get right.

WebOS:Android: Updates

I think I’ll have a break from trying to debug the Palm Pre Debugger plugin as it is doing my head in trying to track all the threads of execution. I need to roll back to a simpler version so I can make sure that is working properly first before trying to get the variable dump working.

Android 1.6 is out and I have been very neglectful recently with my applications on the app store. Would you believe the most popular application is the first one I wrote ‘Simple Weather’? The others have been trounced well and truly in the download stakes.

Variables

The app store is looking for screen shots. I sat down tonight and booted up the Android emulator only to realise I hadn’t a clue what I was doing. So, I think I should spend a few days getting back into the toolset.

WebOS: No Debugger Under Eclipse

Palm Pre developers can spin this any way they want but it’s currently not possible to set breakpoints using Eclipse, break on a line, inspect the variables or anything else debug-wise from within the IDE. It seems you have to use a command-line debugger.

I know it’s not like it’s _impossible_ to use but are we really expected to enter the full path to a line in the code to set a break point e.g.

var/usr/palm/applications/com.yourdomain.test/app/assistants/stage-assistant.js:5

I’m not sure what to say about this? My expectations were somewhat higher.

WebOS: newsReader SDK Sample

I have been playing around with the Palm Pre WebOS SDK. Compared to my efforts to get J2ME stuff to work (ages ago) I have to commend both Android and now Palm in making these phone SDK’s so easy to get up and running. For both Android and Palm it’s a painless task from download to seeing applications running on the bundled emulator.

Although tempting it’s too early to make a comparison between WebOS and Android as I have yet to embark on writing anything for it.

Anyway, the SDK comes with a number of samples one which is a pretty full featured RSS reader. There is a problem though. The project can be imported into Eclipse (after installing the appropriate plugin) but does not appear as a Mojo project. The reason for this is that the ‘nature’ in the project file is set to what appears to be the old name for the SDK. In order to get this to work properly in Eclipse you will have to edit the project file.


< ?xml version="1.0" encoding="UTF-8"?>
<projectdescription>
	<name>newsReader</name>
	<comment></comment>
	<projects>
	</projects>
	<buildspec>
	</buildspec>
	<natures>
		<nature>com.palm.pdt.nature</nature>
	</natures>
</projectdescription>

The secret is to change the content of the ‘natures’ value to the one above. Now when you import the project into Eclipse it will appear as a proper Mojo app.

The news reader is a great demo as it has a little bit of everything you will be required to know to put together an app which talks to the internet. Interesting features:

Plus lots of other stuff under the hood which I don’t understand yet.

Android: gTraffic UK

I recently got an email from Google stating that the UK market for apps has opened. I figured that there might be some UK traffic applications and I was right. My application isn’t ready quite yet. I reckon by Sunday night I will be able to publish it. I am kind-of on target. The map element isn’t very good yet but I am working on it.

You will see I have added a timeline element to the list view. The duration is displayed with a red line to indicate _now_. I might change this to ‘time left’ but I am not sure how to make that obvious. The Timebar (as I call it) is a custom control. I put this together with help from the developer group and Retio Meier’s excellent book on Android programming.

Here is the loading screen for Strathclyde. The whole of the UK is available through the BBC feed which as far as I know is a mix of Highways Agency and TrafficLink so it’s really the best source you can get.

Main

The main list view with timeline element.

Main

I have redone the icons using InkScape so that they are a ‘bit’ better. Not much since I am no graphic artist. I am really starting to get into InkScape though. An amazing application especially for icons and stuff if you’ve got the patience.

I think this is going to be a free application. That was how I had visualised it. The BBC data comes with some heavy duty conditions which the iPhone developer of a similar application got around (I presume) by making people add the xml feed URL themselves. I am undecided. I feel that using the data in that way was a but underhand. I believe in free data for this stuff.

Android: Traffic UK Map

Here is the map view. I just got this working so I am pretty chuffed. I calculate the bounds for each region when I load the data. These value are stored in the database against the region name and then when the map is created it sets itself to the bounds of the displayed data.

Main

That’s all the main views in now so I need to go back through the whole thing and tidy up a few funnies.

I reckon there is a weeks work left and this will be publishable.

General: Progress

I was hoping to get the Android weather app ’simple weather’ into some sort of semblance of working order before the end of the year but it doesn’t look likely now. I ran up against a problem which showed itself when the phone orientation was flipped repeatedly. Basically my worker thread was holding onto the SQLLite cursor somehow so that when the view adapter went to requery it there was an issue getting hold of it (at least I think that what was causing it).

This problem got me started on examining the UserTask.java class which is bundled into some of the examples at apps-for-android. This is an interesting class and is worth some study. Basically it lets you spawn a background thread to perform some task which will take some initial parameters and return a stated type.

I wasn’t happy with my understanding of what was going on inside this so I set out to write an Android version of the CommandProcessor design pattern.

I think I have it working and what I think I’ll do is forget about the weather application just now and try and write a demo app which will show off what I have discovered when dissecting UserTask.java.

gwt-jsviz #2

The 0.0.1 gwt-jsviz codebase has been moved into the ‘tags’ svn directory. You can still access it under tags\0.01.

This has been done to make way for the 0.0.2 version code which is now in the main source trunk. The has the JSViz widget converted to a panel and the demos have been updated accordingly.

There is a rudimentary tabbed demo in the source tree which will crash your browser if you are using Firefox so avoid that for now.

GWT:Simile Timeline HOWTO

If you look up to the right under the ‘pages’ section you will find a link to a HOWTO page for the GWT Timeline which details all the information you should need to get up and running with the GWT Simile Timeline widget. Any feedback on this is welcome. I think I have covered (almost) all of the questions I have been asked about the widget so have a look.

For an instant idea of the GWT Simile Timeline click in the this link here Timeline Test

There is an existing issue about loading the timeline from a XML string but I have yet to find out how to do this. I _thought_ it was simple but it turns out it is not that easy! If anyone resolves this then mail me and you will be credited in the code. I want to know…

gwt-yui-ext

I have been working on a GWT Wrapper API for Jack Slocum’s javascript GUI component library yui-ext. In Jack own words this is a ‘library of reusable JavaScript widgets and classes that extend the Yahoo! UI Library’.

Sidu Ponnappa has an example of yui integration here but his drag and drop example doesn’t look like the sort of thing I would use (yet) and also layout managers are the major thing that drove me to start using GWT in the first place.

So, I have been casting an envious eye over Jacks particular layout manager for quite a while now and after the Simile Timeline GWT Wrapper I have started to get an eye for what can be wrapped easily and what can’t.

There is a lot to yui-ext but it’s usage can be boiled down to the examples on the documentation page which means that is my main target. So far it’s just the BorderLayout stuff and the theme setting but it’s getting there.

Here are some screenshots. I see my home town of Milngavie appears to be hemmed in by golf clubs.

Map tab

and

Map tab

You can zoom in using IE ctrl+/- or in Firefox right click and choose ‘View Image’.

I am hesitant to create a Google Code project as I am unsure (a) what Jack will make of this and (b) I don’t want to starting having to field questions about yui-ext when I am far from an expert (hey at least I’m honest).

I could have just published the layout manager as it was on the first cut but I went on to insert some real controls into the central panel (Google Map and GWT Simile Timeline). Quite a lot of redesign later (ComplexPanel based now) and I am struggling with the thorny issue of getting the controls to resize correctly into the central panel.

I don’t know when this will be ready for the big-time but I thought I’d point out that I am working on it anyway.

Next Page →