phonegap geolocation always fail on timeout

前端 未结 11 730
遥遥无期
遥遥无期 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:22

    Try removing the Phonegap plugin geolocation plugin from your project. You won't need to make any changes to your JavaScript code as your device will fall back on the standard HTML5 navigator.geolocation functionality which has the same method signature.

    Assuming you're using PhoneGap 3.3, you just need to run:

    cordova plugin rm org.apache.cordova.geolocation
    

提交回复
热议问题