teaching machines

bischetw MyPlaces

October 20, 2011 by . Filed under cs491 mobile, fall 2011, postmortems.

I wrote an application that’ll allow a user to add places to google maps.

Originally I had grand plans of querying the web for values and allowing the user to search for a location or click and get the location name.  This would have been done using something called Geocoder but apparently Geocoder doesn’t work on an emulator.  I tried the workarounds online but, as I wasn’t working on my own computer, I didn’t have privileges to edit a file that needed edited (dang!) so, I gave up with the Geocoder after many hours of work.

One thing that’s lacking in my app are any directions so, they definitely need to be explained here.  I have an on long touch listener on the list activity that’ll take the user to an edit screen where the user can edit/see the name and description of a place.  Simply clicking on a place will take the user to google maps with centered at the location with a triangle pointer (that I designed!) above it.

If the user straight up clicks the “Go to maps” list item then it’ll take the user to the last looked at spot but, zoomed out more.

On the maps screen the user can hold down for a second to add a new location.  The user can also touch an existing location to get the name of it.

I had some difficulties getting the adapter to refresh after deleting an item in a separate activity, so I eventually decided to loop through the entire adapter and see if the returned ID matched an adapter ID and, if so, remove the item  (check the code that you don’t have, that sounds confusing).

I’m a lot more pleased with this app than the last one just because the user interface is so much smoother… the last one was just atrocious.   The only *glaring* bug I can see is the one where a user adds a new place.  It automatically triggers if the user holds down on the screen for 1 second; I was trying to get it to go based off of how far the user moved (event start vs event end) but there is no way of tracking start and end events.  I tried creating an inner class that would track the start and then sleep for one second but stuff just wasn’t working so I left this detail to be fixed at a later time.

I used the Rattler application as a base for all the database stuff but I had to branch out and figure out problems specific to my part.

Was a good challenge; I give this two thumbs up.