使用 GeoCoordinateWatcher 时 Windows Phone 7 出现性能问题?
我可以在Application_Launching中使用GeoCooperativeWatcher来检查手机定位服务是否启用或禁用吗?这会影响性能吗?
问候,
派纳奇
Can I use GeoCoordinateWatcher in Application_Launching to check that the phone location service is enabled or disabled? Does this affect performance?
Regards,
Panache
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不!
让应用程序启动,然后再决定。
即使定位服务被禁用,您也需要您的应用程序正常运行。
确认定位服务正在运行没有时间保证,因此如果您等待,可能会超出允许的启动时间。
或者您只是想问如何使用 GeoCoordinateWatcher?
编辑:
如果您只想显示一次,则只需跟踪是否显示了提示/消息即可。
另请注意,由于在应用程序被逻辑删除时设置发生更改,仅在应用程序启动时执行检查并不能保证它始终正确。
例如
已启动的
Don't!
Let the app launch and then decide.
You need your app to function even if the location service is disabled.
There is no time guarantee in confirming the location service is running so if you wait you may go over your allowed start up time.
Or are you just asking how to use a GeoCoordinateWatcher?
Edit:
If you want to only display this once, then just keep track of if you've displayed the prompt/message.
Also be aware that due to settings being changed while your app is tombstoned just performing the check on application launch does not guarantee that it will always be correct.
e.g.
started