phonegap geolocation always fail on timeout

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

    From my trial and error analysis, its most likely: 1. The version of android you're using. On Lollipop and lower you may need to go to the phones location settings and enable high accuracy settings (using gps, wlan and mobile networks to get location). I had to do this on a kitkat phone. 2. As others have mentioned, you can try changing the settings of getCurrentPosition by either enabling/disabling highaccuracy and adding a timeout. 3.If you're using ngCordova, make sure you installed it right and the location functions are actually being called. Use console to verify

提交回复
热议问题