简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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