phonegap geolocation always fail on timeout

前端 未结 11 742
遥遥无期
遥遥无期 2020-12-06 01:06

I\'m using sencha-touch 2.0 and phonegap 2.0.0 in my app to retrieve user\'s location. When runing on my locahost, everything works just fine. However, when loading the .apk

11条回答
  •  北荒
    北荒 (楼主)
    2020-12-06 01:38

    I restarted and restarted. I reset my phone to factory settings.

    But nothing worked.

    Until I set enablHighAccuracy from true to false.

    And... Tada.... it works.

    So :

    var options;
    
    options = {
        maximumAge: 30000,
        timeout: 5000,
        enableHighAccuracy: false
    };
    

    This used to work fine using PhoneGap 2.6.0. I needed to make this change since I'm now using Phonegap 3.3 - tested on a Wiko Cink+ phone.

提交回复
热议问题