iphone:Enabling-push-notifications

出自UXGuide.net

跳转到: 导航, 搜索

请帮助我们修订和更新本文的译文部分

本文的译文部分可能是由多个贡献者提供或从不同的渠道收集,未经过最终审阅和整理,请您帮助我们一起修订和更新本文的译文部分。

启用推送通知
Enabling Push Notifications

When you register your application with Apple Push Notification Service, you can arrange to alert users when new data arrives, even if your application isn’t running. When a device receives a message for an application that isn’t running, it can notify the user by:

当你为你的应用程序注册苹果推送通知服务时后,当接收到新的数据后,即可安排提醒予以用户(提醒新数据),即使你的应用程序没有运行。当设备接收到某个未运行应用程序的信息时,它可以这样通知用户:

or some combination of these. The user might respond by starting the application to manage the new data or merely acknowledging its arrival. (To learn how to handle push notifications in code, see Apple Push Notification Service Programming Guide.)

或者任意组合上述的通知方式。用户对通知的反应可能有,启动此应用程序去管理一下新数据,或者只是了解通知的到达(而不采取任何操作)。(要了解如何用代码处理推送通知,参见苹果推送通知服务编程指南。)

Note: Delivery of push notifications is not guaranteed. Also, users can refuse to receive notifications system-wide. Push notifications are intended to notify users of new data, not to deliver critical data to your application.

注意:推送通知的发送不是有保证的。同时,用户可以全系统地拒绝接收通知。推送通知的目的是通知用户有新数据,并不会向你的应用程序写入重要数据。

The Notifications section in the built-in Settings application hosts push notification settings for every application that registers for the Apple Push Notification Service. For each application, iPhone OS provides settings for users to allow or disallow badging, sounds, and alert messages.

内置的设置应用程序中的通知设置部分主导着推送通知的设置,它对每个注册了苹果推送通知服务的应用程序都提供了设置。对于每个应用程序,iPhone操作系统都提供给用户允许或不允许,标记,声音,提醒的三种方式的通知。

Take some time to think about the types of events for which users would appreciate notification. A notification should give users useful, actionable information they want to receive, even when they’re not using your application.

请花一些时间想想什么类型事件的通知是用户希望的。通知应给予用户那些有用的,可付诸操作的信息,即使他们没有使用你的应用程序。

After you’ve identified the events your users are likely to care about, you should also allow users to decide which events should generate what type of notification, if any. If you don’t allow users to customize the push notification experience in your application, you’re liable to pester users with notifications they’re not interested in.

当你已经确定应用程序的哪些事件用户可能会关心之后,如果有的话,你也应该允许你的用户决定哪些事件使用什么类型的通知。如果你不允许用户自定义应用程序中的推送通知的体验,你就容易让用户陷入与他们不感兴趣的通知的纠缠之中。

Users can choose which types of notifications they want to receive, so you should support all three types:

用户可以选择他们想要接受哪些类型的通知,所以你应该支持所有三种类型:

标记。标记是打扰程度最小的方式告知用户有新的他们感兴趣的内容。标记出现是在主界面应用图标右上角的一个红色小椭圆。你不能对标记的出现做任何控制,它只包含数字,没有字母和标点。
Badging works well when you want to tell users how many items are waiting for their attention. For example, the number in a badge might indicate unread messages, newly assigned tasks, or how many remote players are currently playing a game.
当你想要告诉用户有多少通知项在等待他们的注意时,标记很有效。例如,在一个标记里数目可能会显示未读消息,新分配的任务,或者是当前远程参与者。
声音。你可以提供一个自定义提醒声音,也可以使用内置的提醒声。如果你创建一个自定义的声音,请确保它是短暂的,独特的,专业化制作的。 (要了解有关这个声音的技术要求,在苹果推通知服务编程指南中参见“准备自定义提醒声音”。)请注意你不能强迫设备发出通知时振动;应该由用户控制是否警告伴随振动。
An easily recognized sound is ideal for situations in which the notification arrival itself provides enough information for users to act. For example, a collaborative task management system might use a unique sound to accompany the completion of a member’s assignment. Merely hearing this sound tells the user that the assignment has been completed.
在通知到达的时候,提供一个容易识别的声音是十分理想的选择,因为它提供足够的信息给予用户反应。例如,一个用于多人协作完成任务的管理系统,可以使用一个独特的声音,伴随成员任务的完成。仅仅听到这个声音,用户就会知道已经完成了任务。
提醒。提醒是打扰程度最大的通知用户有新内容的方式。在提醒的上方显示你应用程序的名称,下方显示的是信息,底部有一至两个按钮。如果你指定两个按钮,应在左侧显示关闭按钮,右侧显示查看按钮(用户可以通过点击查看按钮,关闭该提醒同时并启动应用程序)。如果你指定一个按钮,提醒只显示一个确定按钮。关闭按钮和确定按钮的作用都是关闭提醒,并且不打开应用程序。
Alerts interrupt the user’s workflow, so they’re best used sparingly to deliver a short, important message about an event. In particular, be sure to avoid including any advertising content in your alert message.
提醒会干扰用户的工作流程,因此最好少用他们,除非是用来为你提供有关事件简短的,重要的信息。尤其是,一定要避免提醒消息中的包含任何广告内容。
个人工具
名字空间
变换
动作
导航
工具箱