iphone:Using-the-users-location
出自UXGuide.net
请帮助我们修订和更新本文的译文部分
本文的译文部分可能是由多个贡献者提供或从不同的渠道收集,未经过最终审阅和整理,请您帮助我们一起修订和更新本文的译文部分。
利用用户的位置
Using the User’s Location
Users appreciate application features that allow them to automatically tag content with their physical location, or to find friends that are currently nearby. Users also appreciate being able to disable features like these when they don’t want to share their location with others. Users can grant (or deny) system-wide access to their physical location with the Location Services setting in Settings > General.
用户喜欢应用程序提供的允许用户使用物理位置来自动标记内容,寻找当前附近的朋友的特色功能。当用户不想与他人分享位置信息时,他们也希望能有禁用的功能。用户可以在“设置”应用程序中的常规菜单中,全系统地设置允许或者拒绝通过位置服务获取他们的物理位置。
If users turn off Location Services, and later use an application feature that requires their location, they see an alert that tells them they must change their preference before they can use the feature. The alert does not allow them to make this change within the application; instead, they must go to Settings and change their preference. This ensures that users are fully aware that they are granting system-wide permission to use their location information.
如果用户关闭位置服务,随后使用应用程序某个需要提供位置的功能,他们将会看到一个提醒,告诉他们必须修改预设,才可以使用该功能。提醒不提供给用户在当前应用程序修改预设的功能,反而,他们必须进入“设置”应用程序,然后改变他们的预设。这可确保用户充分认识到,他们在全系统地允许系统使用他们的位置信息。
To help users understand why they might need to turn Location Services on, it’s best if they see the alert only when they attempt to use a feature that clearly needs to know their current location. For example, people can use Maps when Location Services is off, but they see the alert when they access the feature that finds and tracks their current location.
为了帮助用户了解为什么他们需要打开位置服务,最好的方式是,在他们打开某个需要知道他们当前位置的功能的时候,给他们一个提醒。例如,当位置服务是关闭时,人们依然还是可以使用地图服务的,但他们想获取或者是跟踪他们当前的位置的时候,他们将会看到一个提醒。
If Location Services is turned off, iPhone OS displays the alert the first time your application tries to access location information. The Core Location framework provides a way for you to get the user’s preference so that you can avoid triggering this alert unnecessarily or inappropriately. (See Core Location Framework Reference to learn more about this programming interface.)
如果位置服务是关闭的,当你的应用程序第一次尝试访问位置信息时,iPhone 操作系统将显示提醒。核心位置(Core Location)框架提供了一种方法让你可以获得用户对位置服务的预设,避免你不必要的或不适当的触发此提醒。(要了解更多此编程接口信息,参见Core Location Framework Reference。)
With knowledge of the user’s preference, you can trigger the alert as closely as possible to the feature that requires location information, or perhaps avoid it altogether.
获取了用户对位置服务的预设以后,你就可以只为那些非常紧密地非常可能需要用户位置信息的功能,触发提醒,或者说,完全地避免这些提醒。
- If your application cannot perform its primary function without this information, it’s best if users see the alert as soon as they start your application. Users will not be bothered by this, because they understand that the main function of your application depends on knowing their location.
- 如果你的应用程序主功能没法在没有位置信息的环境下工作,最好就是让用户在启动它时就看到提醒。用户不会因此而感觉不快,因为他们明白,你的应用程序的主功能的执行依赖于他们自己的位置信息。
- If the user’s location is not part of the essential function of your application, you might choose to simply restrict the feature that uses it. For example, when Location Services is turned off, Camera automatically turns off the feature that adds the user’s location to the photos they take. It does not prevent users from taking photos unless they change their preference, because adding location information to photos is appreciated, but not essential.
- 如果用户位置不是你的应用程序实质功能的一部分,你可以选择仅仅只是限制那些要使用用户位置的功能。例如,当位置服务是关闭的,“相机”应用程序会自动关闭在他们拍摄的照片中增加用户位置信息的功能。如果用户不改变他们的预设,“相机”应用程序并不会阻止用户拍照。因为在照片中添加位置信息是额外功能,并非实质性的。
- If a feature needs location information to function, be sure to avoid making any programmatic calls that trigger the alert before the user actually selects the feature. (The call that gets the user’s preference does not trigger the alert.) This way, you avoid causing users to wonder why your application wants their location information when they’re doing something that doesn’t appear to need it.
- 如果一个功能需要位置信息才能运行,请确保除非用户真的使用这个功能,否则不要执行任何触发提醒的编程的调用之前,(获取用户对位置服务的预设的调用并不会触发提醒。)这样,你就可以避免使用户产生如“明明你的应用程序看起来在做一些完全无关的事情,却需要我的位置信息”的疑惑。