There's a bunch of commercial apps to do the same for iPhone, but they all feel incredibly scammy (though I've tested a few, and they work fine). I'd love to find an open source option, or even a pointer to the requisite APIs.
GPS based games watch for this stuff as table stakes. They don't want you getting more "free" currency or items than you are normally expected to get because that screws with their profits