Skip navigation

Tag Archives: google maps

Biggest. Hurdle. Yet.

The base code I was waiting for came finally this week. They seem to have resolved it last Friday, after I went home. However, I spent the better part of Monday improving on a more stable feature trying to beat an afternoon deadline for a demo build. I only started looking at the base code around noon.

The instructions were pretty simple. Extend and override the methods of class Foo and then call method bar() of class FooBar. Sounds easy right?

Well it is supposed to be easy. Unfortunately, things went a bit more complicated for me in this episode of my adventure.

At this point, I am unwilling to continue my story using the optimistic-man voice I am hoping I have sounded like so far. It wouldn’t do the frustration involved any justice. Instead, I’ll be taking a leaf out of the books of those genii-going-madman from the movies and tell my story…

…event-log style (cf. Darren Aronofsky’s Pi)

Monday, 9/16/2011, sometime after lunch. Carefully read through resources and emails for instructions on how to work with the framework we are using. I coded what I’ve understood so far. Right. This should work. Hit “run”.

Monday, 9/16/2011, around 4PM. How many times have I hit run and I still don’t see a single map tile on my AVD? I already encountered this problem when I first worked with Google Maps but I don’t remember how to resolve it. They say it boils down to my API key, which is already there, copy-pasted from the layout xmls of my previous Google Maps work.

And it doesn’t help that AVD3 takes a lifetime to load or that, every now and then, connection to it times out and you can’t test your code on it anymore and the only solution is to close the AVD and wait for another lifetime.

Tuesday, 9/17/2011, morning. A beginner’s mind is a fresh place to come from, Zen says. So, this morning, I tried to address the issue of Google Maps not showing on my AVD. I perused StackOverflow, Android Dev Notes, Ubuntu Programming Talk forums, hell and high water but nothing seems to work for me. I even tried to regenerate my API key! After a few failed attempts at getting Google Maps to show, my beginner’s mind isn’t so fresh anymore.

Tuesday, 9/17/2011, after about an hour. I decided to test my previous guaranteed-working Google Maps code. They didn’t work. Tried to run them on an AVD in another computer. They worked. What?!

Tuesday, 9/17/2011, after a few minutes. Explained the developments in the issue to my mentor. Turns out that I hadn’t set the proper port and proxy. That’s funny since I don’t remember tinkering with the AVD’s settings since the last time I worked with Google Maps. While I appreciate the art in classic cartography, I never thought the sight of a map can make me this ecstatic.

Right. Whatever. Must. Code. Now.

Tuesday, 9/17/2011, around lunch. I can’t figure out what I’m doing wrong. I followed every instruction—extended every class they told me to extend, overrode every method they told me to override—and it still won’t work. I’m caught up in a cycle of read-code-run-ask. I’m starting to feel embarrassed as I repeatedly go to the same person for help. He seems to be the only one who understands what’s happening in the code and I seem to be the only person in need of his assistance. Perfect combination.

(If it’s any consolation, I’m the only one working with his code.)

It won’t work even after I showed him my codes and he nodded telling me it should work. Should.

Tuesday, 9/17/2011, an hour or so after lunch. I decided to run the sample code instead of just studying it and trying to get the pattern. It works flawlessly. What I can’t understand is why it doesn’t work for me. My bad. This code hates me.

Tuesday, 9/17/2011, after about 30 min from last log. Breakthrough. He pointed out that he didn’t really extend and override the methods of class Foo himself. There were already pre-made classes in the framework which did that for us. All I have to do is add my own code, should I need some more functionality/processing.

Wow. I didn’t know that.

Wednesday, 9/18/2011. (At this point, logs will have precise time stamps as it is this day that I thought up of this whole scheme.)

Wednesday, 9/18/2011, 9:18 AM. Succeeded in disabling the sample code. That’s intentional, the rationale being, if I can break it I understand it…

Non sequitur. Turns out rationale isn’t really very rational as I still can’t do what I want to do with the code.

Wednesday, 9/18/2011, 9:42:56 AM. (Time stamp from Android’s console at Eclipse. That’s accurate!) Modified the code some more and then hit run. Console greeted me with the following message: “Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE”. My bad. How big has our project become!

Wednesday, 9/18/2011, 10:06 AM. I thought I got it but still no. Hmppfff.

Wednesday, 9/18/2011, 10:32 AM. SUCCESS AT LAST!!! Must document how I did it so I can modify further! YEAAAAHHHHHHH!!!! I’m happy again!

<(‘-‘<) ^(‘-‘)^ (>’-‘)>

So. There you go. A story of my descent to madness then rise to happiness for the past few days.

Stay happy. Till next time ~ The Andrei Estioco