diff --git a/docs/html/wear/preview/api-overview.jd b/docs/html/wear/preview/api-overview.jd index 384cb0a416ce8..543313af1a392 100644 --- a/docs/html/wear/preview/api-overview.jd +++ b/docs/html/wear/preview/api-overview.jd @@ -147,7 +147,7 @@ see

If you have a chat messaging app, your notifications should use {@code Notification.MessagingStyle}, which is new in Android 6.0. Wear 2.0 uses the chat messages included in a -{@code MessagingStyle} +{@code MessagingStyle} notification (see {@code addMessage()}) to provide a rich chat app-like experience in the expanded notification. diff --git a/docs/html/wear/preview/features/notifications.jd b/docs/html/wear/preview/features/notifications.jd index 0962eb4b5f828..75f9feeffc441 100644 --- a/docs/html/wear/preview/features/notifications.jd +++ b/docs/html/wear/preview/features/notifications.jd @@ -41,7 +41,7 @@ material design visual changes.

-

Figure 1. Comparison of the same notification in Android Wear 1.x and 2.0.

+

Figure 1. Comparison of the same notification in Android Wear 1.x and 2.0.

Some of the visual updates include:

@@ -82,13 +82,14 @@ material design visual changes. substantial additional content and actions for each notification.

When you specify additional content pages - and actions for a notification, those are available to the user within the - expanded notification. Each expanded notification follows + and actions for a notification, those are available to the user within the + expanded notification. Each expanded notification follows Material Design for Android Wear, so the user gets an app-like experience.

-

-

Figure 2. An expanded notification with content and actions.

+ + +

Expanded notifications

If the first action in the expanded notification has a {@code RemoteInput} (e.g., a Reply action), then the choices you set with {@code setChoices()} @@ -102,7 +103,7 @@ material design visual changes.

  • The notification is generated by an app on the paired phone and bridged to Wear.
  • -
  • The notification does not have a +
  • The notification does not have a {@code contentIntent}.
  • @@ -126,9 +127,11 @@ material design visual changes.

    Expanded Notifications allow you to include additional content and actions for a notification. You choose the level of detail that your app's notifications - will provide; however be judicious with the amount of detail you include in a - notification. + will provide; however be judicious with the amount of detail you include in a + notification.

    +

    Adding additional content

    To show additional content in your expanded notification, see Adding Pages to a Notification.

    Additional content pages are stacked vertically in the expanded notification @@ -151,34 +154,36 @@ action in the notification unless a different action is specified using

    If you have a chat messaging app, your notifications should use {@code Notification.MessagingStyle}, - which is new in Android 6.0. Wear 2.0 uses the chat messages included + which is new in Android N. Wear 2.0 uses the chat messages included in a {@code MessagingStyle} notification + (see {@code addMessage()}) to provide a rich chat app-like experience in the expanded notification.

    -

    Note: {@code MessagingStyle} + +

    Note: {@code MessagingStyle} expanded notifications require that you have at least version 1.5.0.2861804 of the Android Wear app on your paired Android phone. That version will be available within the next few weeks in the Play Store.

    +

    Smart Reply

    -

    Wear 2.0 also introduces Smart Reply for {@code MessagingStyle} notifications. + +

    Wear 2.0 also introduces Smart Reply +for {@code MessagingStyle} notifications. Smart Reply provides the user with contextually relevant, touchable choices in the expanded notification and in {@code RemoteInput}. These augment the fixed - list of choices that the developer provides in + list of choices that the developer provides in {@code RemoteInput} - using the + using the {@code setChoices()} method.

    By enabling Smart Reply for your MessagingStyle notifications, you provide users with a fast (single tap), discreet (no speaking aloud), and reliable way to respond to chat messages.

    -

    -

    Figure 3. The expanded notification includes contextually relevant - Smart Reply responses below the primary action. -

    Responses generated by Smart Reply are shown in addition to those set using the {@code setChoices()} method. @@ -189,7 +194,7 @@ following:

    1. Use {@code Notification.MessagingStyle}.
    2. -
    3. Call the method +
    4. Call the method {@code setAllowGeneratedReplies()} for the notification action.
    5. Ensure that the notification action has a @@ -222,8 +227,9 @@ Notification noti = new NotificationCompat.Builder() .setSmallIcon(R.drawable.new_message) .setLargeIcon(aBitmap) // 2) set the style to MessagingStyle - .setStyle(new NotificationCompat.MessagingStyle(resources.getString(R.string.reply_name)).addMessage(messages[0].getText(), messages[0].getTime(), messages[0].getSender()) - .addMessage(messages[1].getText(), messages[1].getTime(), messages[1].getSender())) + .setStyle(new NotificationCompat.MessagingStyle(resources.getString(R.string.reply_name)) + .addMessage(messages[0].getText(), messages[0].getTime(), messages[0].getSender()) + .addMessage(messages[1].getText(), messages[1].getTime(), messages[1].getSender())) // 3) add an action with RemoteInput diff --git a/docs/html/wear/preview/images/comparison_diagram.png b/docs/html/wear/preview/images/comparison_diagram.png index 7dbf65f2a216f..4bcf10e9aeda6 100644 Binary files a/docs/html/wear/preview/images/comparison_diagram.png and b/docs/html/wear/preview/images/comparison_diagram.png differ diff --git a/docs/html/wear/preview/images/messaging_style.png b/docs/html/wear/preview/images/messaging_style.png index 966e524c6db52..a3bf109aa15f4 100644 Binary files a/docs/html/wear/preview/images/messaging_style.png and b/docs/html/wear/preview/images/messaging_style.png differ diff --git a/docs/html/wear/preview/images/messaging_style_diagram.png b/docs/html/wear/preview/images/messaging_style_diagram.png deleted file mode 100644 index 3b21c79730bcc..0000000000000 Binary files a/docs/html/wear/preview/images/messaging_style_diagram.png and /dev/null differ