Geocoding with Mapstraction v2 and Google Maps v3

There isn’t a whole lot of info out there about how to use Mapstraction, especially the v2 API, so here’s one thing I’ve had to pick up along the way.

I spent a little time hacking together a geocoder module that uses the Google Maps v3 API, but was having to track down why it wasn’t loading properly. Continue reading Geocoding with Mapstraction v2 and Google Maps v3

hello-gdbserver: A debuggable JNI example for Android

Prolog

Before I get into the rest of the post, here is a link to a .zip of the Eclipse project files if you just want to skip ahead.

The Rest Of The Post

Native software development on Android using its JNI capabilities is incredibly frustrating without proper visibility into the causes of native code errors.

Here is an example project and some background info that shows how to get gdb and gdbserver working to catch those nasty bugs. Just extract the project files into the NDK’s sample directory and import the project into Eclipse.

Here were some of the search terms I tried unsuccessfully while trying find something like this:

using gdb on android
using ndk-gdb
debug jni android
hello world android native code
hello world android emulator
debugging using gdbserver android

Requirements

  • A phone running Android 2.2 (Froyo) (might work on the emulator, but I didn’t focus on that)
  • The latest Android NDK (at least r4b)
  • Lots of Patience

The NDK-GDB.TXT readme file in the NDK has a good overview of the process of getting a debuggable Android application + JNI build set up, but I would have much preferred it if Google had simply included something like a hello-gdbserver test app in the provided samples. One simple app where you could induce a crash to see what would happen, like a tutorial for smarter bug-hunting. So, I made this one. Continue reading hello-gdbserver: A debuggable JNI example for Android