确认用户选择“不允许”定位服务
我在我的应用程序中使用位置服务。最初,应用程序要求用户允许查找当前位置。如果用户说“不允许”,我可以再显示一个警报来确认该选择吗?那么,如果用户在第二个对话中说“允许”,应用程序可以获得当前位置吗?
I am using location services in my app. Initially the app asks the user to allow finding the current location. If the user says "Don't Allow", can I show one more alert to confirm that choice? Then, if the user says "Allow" in that second dialogue, can the app get the current location?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不可以,这是由系统管理的。
您可以/应该检查用户是否允许您的应用程序获取当前位置。
因为您可以在设置应用程序中更改此设置,
检查可以这样完成:
No you can't, it is managed by the the system.
You can/should check if the user allowing you app to get the current location.
Because you can change this in the settings app
Check can be done like this:
我认为..................
这是不可能的,因为它是 iPhone 的默认设置......
如果你得到答案,请回复......在此页面......
但是你改变了iPhone的设置,转到设置图标,转到常规图标,转到当前位置,然后按此按钮...
对不起,英语很差
i think..................
its a not possible beacuse its a default setting of iPhone ....
if u get answer please reply ....in this page......
but u change the setting of iphone, go to setting icon , go to general icon , go to current location and on this button...
sry for poor english
问题是谁显示第二条消息。
如果是 CoreLocation 显示消息,那么最后一个答案才是最重要的 - 所以如果它是“允许”,那么就可以。
但是 - 如果在“不允许”之后您显示自己的自定义消息 - 答案没有任何影响。
它必须来自 CoreLocation
The question is who is showing the second message.
If it's CoreLocation that is showing the message than the last answer is the one that counts - so if it was "allow" then you can.
However - if after the "Disallow" you show your own custom message - the answer there has no affect.
It must come from CoreLocation