Tube Delay Refund for android released

by jaymz on 14/07/2010

Update (v1.4.0) National Rail & TFL Travelcard support has been added. (August 2nd)

Update (v1.3.2) Some layout rejigging has been done, defaults added and a few more menu options for resetting/prefilling. The preferences layout has also been tidied. (July 17)

Updated (v1.2.0) I have updated this app to disable submission until all the station/date info is added. I’ve also added some more labels to show what’s been entered so far. You must make sure you’ve filled in all the preferences or else it’ll fail (Click menu>preferences). (July 16)

A few days ago I was in bed trying to sleep and I suddenly thought it would be good if there was an app to submit refunds for the tube as you come out. I had in my head the idea of a timer that would count down from 15 minutes and then alert you that you were in valid refund territory.

After I coded said timer, I pushed it live without refund submissions working. I also did a quick google to see what else there was only to discover that there was a company that released the exact same app on the iPhone about 3 months ago. Let this be a lesson that if you are about to code something as an exercise don’t go googling first or you’ll inevitably be put off because “whats the point”.

Several hours later today and it is now submitting refund applications to TFL and I get an email confirmation with the reference number. I’m very happy if incredibly tired. The app is free for now, all the others that do these on Blackberry/iOS are paid for. There doesn’t seem to be one for android yet, the guys that did the iPhone app said they where working on one way back in March or April, not quite sure what happened to it. They’re about to release the blackberry one so for now this is the only refund submission app on android :D Took me basically 2 days part time.

From a technical point of view this is making use of the apache http libraries to do a GET request for the TFL refund page. It parses that to grab the ASPX Viewstate variable and session cookies. Then it grabs the data from the main activity and combines that with the data stored in shared preferences for the form variables. The POST request is processed and the response parsed again to find the reference number. That’s then displayed via a Toast call. Fairly simple, having to deal with the viewstate crap was probably the most annoying part, that and debugging the actual POST.

There are 4 comments in this article:

  1. 14/07/2010Shane says:

    Cool idea for an app. Pity translink don’t offer the same refund option.

  2. 14/07/2010jaymz says:

    I was somewhat devastated after googling and seeing all that iPhone version one! Then I got some complaints that it didn’t do a submission so I forced myself to work til 4am on it :) It’s working now but some people are still having issues, I reckon I need some better documentation & throw some validation in there.

  3. 4/12/2010James Cridland says:

    Shame it currently isn’t working.

    Good of you to change the description; but is there no way for you to remove it from the Marketplace until it’s fixed? The Marketplace is full of dross as it is…

  4. 28/01/2011Jar says:

    Any chance of an update on this apps?
    Have you found a fix? will it be avialable soon from the market place?