0
我有一個phonegap項目,在應用程序的背景中使用WatchPosition。它有點時間,但有時當應用程序啓動我得到位置超時錯誤3.Phonegap WatchPosition停止更新。 EBUSY?
而我的iPhone的日誌說,位置是(EBUSY)。
這是一個phonegap的bug?
代碼:
function onDeviceReady() {
var watchID = navigator.geolocation.watchPosition(onSuccess, onError, { timeout: 10000, frequency: 3000,enableHighAccuracy: true });
}
function onSuccess(position) {
var deviceID = device.uuid;
$.post("http://server.com/project/savelocation.php", { lat: position.coords.longitude, lng: position.coords.latitude, device: deviceID },
function(data) {
console.log("Location updated.");
});
}
它有時工作正如我所說的,但我得到的錯誤是:
[INFO] code: 3
message: Geolocation Error: Timeout.
locationd[41] <Notice>: received EBUSY, try kScanTypeChannel, channel, 11, rssi -60, delayed 0.000s
這可能是iOS 6的錯誤?
我也有Phonegap 1.2.0所以我不使用最新的科爾多瓦項目呢。