Small modifications to enable piui to extract location from the device.

There were placeholders for this before, but functionality was missing.

This has only been tested on Galaxy Nexus, so not clear abt how portable
it is.