简体   繁体   English

如何在每次启动应用时强制phonegap要求进行地理位置定位?

[英]How to force phonegap ask for geolocation every time app starts?

Im usiging phonegap to build an ios aplication and i use this code to get the current position of the user 我正在使用phonegap构建ios应用程序,并且我使用此代码来获取用户的当前位置

navigator.geolocation.getCurrentPosition(geolocationSuccsess, geolocationError);

but with this it ask's for permission just once when the app starts, i want to force it to ask every time its start's. 但是有了这个,它在应用程序启动时只询问一次许可,我想强迫它在每次启动时都询问。

is there a way to do that? 有没有办法做到这一点?

thanks!! 谢谢!!

The reason it only asks once is that it only has to. 它只询问一次的原因是它只必须这样做。 The browser remembers it for some time, it will appear again only when necessary. 浏览器会记住它一段时间,只有在必要时才会再次出现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM