The project demostrates how to use Baidu Location SDK for android localization. (http://developer.baidu.com/map/geosdk.htm)
The apps runs in background. Every time users unlock the screen, the services will try to locate the position and send then out.
The project is very battery-save. You could simply add the code into your project without bothering user a lot.