Android: Roundup

I have been a bit negligent in posting recently. This is mostly down to two things; I have been really busy putting together a web application for my regular work and also I have been wrestling with Android.

Basically I have been really struggling with the Android framework. I have written four versions of the Weather Focus seven day forecast application that is mentioned in previous posts. I won’t link to it (you can find it by scrolling down) this is because the version 1.0 SDK broke it completely.

I rewrote it initially to remove the SQLLite databasel. This was a stop-gap measure to allow me to get the main functionality correct but I realised eventually that I needed to go back to the SQL database. The reason, as anyone who is attempting anything similar will know, is that you want your user to be able to see the previous contents when they enter the application. If you throw away the data every time then you have to rely on the web connection being up to fetch the new results. For more real-time data this wouldn’t be an issue but for weather information how often is it going to change over the space of a day? Yes I know that Android is always ‘on’ but I have an iPhone and I can testify this isn’t always the case for devices like this.

I could not get the SQL database to work. This went on for weeks and I was beginning to loath the whole process but I sat down during the week and spent three hours poring over the Notepad sample application that comes with the SDK. Of course the fix was simple but totally non obvious.

    public static final String[] PROJECTION = new String[]
    {
    	WeatherDataDefn.DAYDESC,
    	WeatherDataDefn.CONDITIONS,
    	WeatherDataDefn.IMAGE_URL,
    	WeatherDataDefn._ID
    };

If you use an ID column in your database you must include the _ID defn in your PROJECTION defn. Otherwise you will get ‘column _id not found’.

Android Traffic App

Could I figure this out? Not until during the week. To be honest the sample app has this but I didn’t spot it until I went back and started from scratch again. I was beginning to think about giving up but the best development I have done always comes from a bloody minded frame of mind. I _would_ get this working no matter what.

The application is not finished, far from it. But, I have broken the back of the gnarly problems about threads and storing the database. The plan is to release this free on the app store when I get it going.

So now to some links which if you are interested in Android development you might find enlighting.

Flash Android Simulation:

A cool simulation of the OS front end which you can play around with here

Apps For Android:

An invaluable resource of code by some talented Android programmers. Probably the best code resource for Android apps on the web here.

Anddev.org:

The only Android forum on the web where you will get an answer to a question in reasonable time (the official one is a dead loss.. more further on) here.

We are in the middle of a land-grab for android app reviews sites on the web at the moment. I haven’t seen one yet which I like but I think there will be a place for this in the future. Maybe better to wait and see who comes out on top. Handgo have already got an app store of sorts on the go (click on the G1 link on the top left) but I would like to see another player come in and get a piece of ‘potential’ pie.

So on to my gripes. What is going on with the Google Group for Android developers? I think I must have been spoiled by the GWT forum which right from the off was full of great developers. Also you could post and it would appear right away. Someone was moderating it so the spam that made it through was removed pretty quickly. The result of this was a red-hot pace of development with good support from the instant community. I might be wrong but I think the same kind of developers are mooching about the Android forum as well but like me have been put off by

Anyone watching Googles Android support for it’s platform will have noticed that there is something weird going on here. ┬áSurely it is in Googles interest to attact as many developers as they can. Not just the noddy programmers convinced they can make there fortune but others who can learn this platform and make a valuable contribution to helping others.

Update #1

Google seem to have sorted the issues out the the forum at last. I have posted stuff and it now seems to be coming up right away. There is also a cadre of Google engineers which are answering the ‘resonable’ posts as well which is heartning to see.

Flex: IFrame has a new home

I have moved the IFrame to be hosted on Google Code.

There are a few reason for this.

The current version is one submitted from Ryan Bell who is developer at Fusion Media Interactive. Ryan is the latest in a line of people who have taken the time to try and improve the component. Many thanks to him and to all the others who have submitted changes/fixes.

As noted on the new site in future if you want to submit a change to the IFrame then it will have to come with a Flex demo which shows off the particular feature you have added. It’s a bummer I know but really I ┬ádon’t have time to put these sort of things together so no demo no update. Flex is a doddle to write in and it will take you ten minutes of your time!

All references to code on this site will gradually be moved to the Google Code site. So in future this is where you can find it.