Writing cross-platform code to acquire permission to access GPS data, especially in the background, is currently difficult with our existing Ti.Geolocation APIs. It requires the developer to use platform specific APIs on both Android and iOS to do this. There are also OS version specific APIs that must be used on both Android and iOS that makes things even more cumbersome. We should investigate creating higher-level API in Titanium to make this easier.
The attached GeolocationGpsTest.js, GeolocationGpsService.js, and tiapp.xml shows what it takes to do the above today using our existing APIs. It's startLocationTracking() method is about 100 lines long and needs to use platform specific APIs to work. The ideal solution is to simplify this with less lines of code using cross-platform and cross-os-version APIs.