我曾尝试使用org.transistorsoft.cordova.background-geolocation来跟踪背景中的地理位置,但它有问题,并且存在电池问题。我可以使用哪些方法在后台跟踪地理位置?
答案 0 :(得分:1)
您是否查看了PhoneGap文档?他们有several methods地理位置(getCurrentPosition
,watchPosition
和clearWatch
)。
This thread可能有所帮助,但没有一个答案被接受或投票。
我也遇到了你可能想要查看的this GitHub repository。
<强>灌注强>
cordova plugin add https://github.com/transistorsoft/cordova-background-geolocation.git
使用强>
该插件会创建对象window.BackgroundGeolocation
。有关详细信息,请参阅API Documentation